Releases: jamessimone/apex-rollup
Additional Rollup Logging & CMDT Invocable updates
- added additional rollup logging for deferred rollups
- added additional fields to CMDT-based invocable to allow for Flow Builders to ovverride their CMDT for specific flows
Additional Full Recalc Work & CONCAT_DISTINCT bugfixes
- fixes #132 (hopefully) by caching queries and avoiding undercounting when considering if/when to batch versus queue for full recalcs
- separated
RollupTests
intoRollupStandardIntegrationTests
for tests actually querying for updated records / performing tons of DML - Fixed a restrictiveness issue for "always full recalc" operations (COUNT_DISTINCT, CONCAT_DISTINCT, FIRST, LAST, AVERAGE) where records that used to match but would be currently excluded by the calc item where clause sometimes didn't trigger a full recalculation of the parent record
Full Recalc Work, DLRS migration script enhancements
- Fixes #130 by removing bind issue in LWC
- Fixes for the issues in #132 by (nearly completely) bulkifying the full recalc routes. This could still fall over if there were 50k+ children records for 2000 parents, but it should be good enough for now
- Added proper null handling in RollupEvaluator
- @jongpie added new script to deactivate converted DLRS rules to fix #134 🎉
Rollup Logger improvements, Full recalculation & invocable improvements
- Start of work on #68 - begin to flesh out Rollup Logger plugin, with beginning options for Nebula Logger and simple logging framework. For more information, see the "Rollup Logging" section of the README! More improvements will be coming on this front in
v1.2.32
- Fixes #125 by making the date/time/datetime comparisons as safe as possible
- Fix CONCAT issue reported by Katherine West
- Fixing RollupLogger instance lazy loading
- Start of work to reproduce issues with multiple DML statements in the same transaction on objects with deferred Rollup actions called from Flow
- Adding LWC coverage to deployment pipeline
- Aligning flow engine, DLRS migration script, and LWC for Rollup Recalc App to use the same field labels/positions
- Fix two straggler issues from invocable refactor - ensure grouped invocable rollups don't add the same item twice, and ensure count-based rollups properly set the recalculated value prior to returning it
- Fixing issue with map key for CACHED_ROLLUPS + invocables. Bumped beta package version and beta links
- Rollup class minimization (#128)
- break apart mono-Rollup class
- Improvements to recursion detection after adding recursive updates to Flow integration test in extra-tests/InvocableDrivenTests.cls. Because of the way that flow alternately boxcars/queues up different updates, it's doubly important here to make sure that the records are passing through in the right order to properly trigger detection on events like reparenting AND prevent recursive updates from running unless there's been a definitive change to the calc item/rollup operation in question
- Properly calculate parent items with more than 2000 child records in RollupFullBatchRecalculator
- Pinned to specific LWC jest version to avoid API version issue with VS Code test runner, added test coverage for LWC and added missing
RollupLogger
coverage
Summer 21, Parent Recalc Button bugfix, various improvements
-
Bump API versions to v52 for Summer21
-
Fixes #123 by moving to strongly-typed equality checks for greater than / less than in RollupEvaluator
-
Fixes #122 by properly filtering parent recalc button
-
Fixing Datetime -> Date conversion issue reported by Katherine West
-
Fixes #121 by properly decrementing count-based rollups when old calc item matches and updated version does not
-
Fix getBareOperationName in Rollup/consolidate with RollupCalculator
-
Further work on #121 - working fix for UPDATE_COUNT, but further consideration needed for the following operations: UPDATE_COUNT_DISTINCT, UPDATE_SUM, UPDATE_CONCAT, UPDATE_CONCAT_DISTINCT, UPDATE_MIN, UPDATE_MAX. UPDATE_AVERAGE, UPDATE_FIRST, and UPDATE_LAST should already be good (this will be a pending item to address in the next release(s)
FIRST/LAST bugfix for some routes
- Fixed an issue where the order by field wasn't always included in queries for FIRST/LAST
Update "utils" folder/LWC to avoid namespacing issues
- updated
utils
torollupUtils
to avoid namespacing issues
COUNT fixes for UPDATE/UPSERT
- fixed an issue for the flow code path that prevented flows UPSERT/UPDATE flows from correctly counting values in some cases
Doc Updates & Merge Bugfix
- added early return for downstream rollups when merges are being done
- updated documentation to better reflect the steps necessary when implementing rollups where parent-level merges are possible (so, Account /Case / Contact / Lead)
Merge reparenting & recursion updates
- Fixes #112 by adding configurable merge reparenting. This only affects Cases / Contacts / Accounts / Leads as these are the standard Salesforce objects where merging is supported. This also adds the requirement for
after delete
in Apex triggers; there is no corresponding equivalent for invocables since neither Flow nor PB support after delete operations (yet). Raised the visibility of theRollup.runFromApex
to global to assist with plugging the gap this leaves for people using flow-based rollups who also want to opt into the correct behavior for merge-based reparenting. This functionality is now gated behind theRollupControl__mdt.IsMergeReparentingEnabled__c
checkbox field, which comes enabled by default on theOrg_Defaults
rollup control record. See the README section entitled Parent Level Merges for more information! - Fixed an issue with recursion detection where calc items differing only by their where clause values could incorrectly get flagged as not having changed while in a recursive trigger/flow scenario
- Fixed several
RollupEvaluator
bugs - mostly surrounding how a calculation item qualifies during an update if the prior version of the item would have been excluded due to the Calc Item Where Clause, but the new item would not be - Consolidated rollup behavior between invocable/apex-based invocations for two crucial segments - grandparent rollups and rollups triggered from the parent objects. There were previously several subtle differences in the logic for these two sections, and in both cases this was hiding an issue (now fixed) where a full recalculation triggered by either sort of event would prevent other necessary rollups from running at the same time. This issue has now been resolved, and comes with the added benefit of plugging the "escape hatch" code path that had become increasingly prevalent when it came to full recalcs.