Releases: jamessimone/apex-rollup
COUNT reparenting bugfix & better separation of concerns
- Broke out logging to separate rollup object. Broke out queries to separate builder (possible due to refactoring getParedFieldName out of querying methods in v1.2.23). Fixed an issue with COUNT rollups and string-based fields on reparenting
Scalability & Full Recalc Button For Parent Flexipages
Concat Bugfixes
- Fix concat delimiter misplacement reported by Katherine West
DLRS migration script updates, tech debt cleanup
- Updated DLRS migration script thanks to @mickster04 to helpfully print out the DLRS rules associated with objects like
Task
,Event
, andUser
that are not supported via CMDT inRollup
so that the proper invocable actions can be made - Cleaned up some unused variables in
RollupCalculator
and added clarifying notes in a few places
Deprecated:
- Deprecated
RollupShouldRunAsPicklist.cls
in favor of the more genericRollupMetaPicklists.cls
. You can feel free to deleteRollupShouldRunAsPicklist.cls
after upgrading
FIRST/LAST Where Field Updates & WhereFieldEvaluator Caching
Fixes #102 by properly including calc item where clause fields in FIRST/LAST query fields. Started caching RollupEvaluator.WhereFieldEvaluator for better performance, as there are now quite a few classes accessing it only in order to get the query fields
Even Safer Scaling
- Make deferred rollup operations even safer by consolidating logic for when a Rollup is queued, batched, or run synchronously.
- Added additional scripts to aid in testing within sandboxes which contain more than just Rollup's tests.
hashCode update & Deferred rollup bugfix
- Added
RollupTestUtils.cls
to centralize mocking Id creation - Added
RollupRecursionItem.cls
to properly encapsulateequals()
andhashCode()
implementation - big thanks again to @gdoenlen for contributing on this one - Fixed an issue with the
deferredRollups
section that could lead to a gack when deferred rollups are being processed (thanks to Katherine West for reporting this one!)
Full Recalc Bugfixes, Logging & FIRST/LAST quality of life updates
-
Fixes #95 by fixing restrictiveness level for RollupEvaluator
-
Tweaks for #88 to fully support automated pipeline
-
Updating
batch
method to properly intake RollupInvocationPoint -
Fix Apex issue where not all code paths were setting CalcItem__c on Rollup__mdt synthetic records
-
Added baseline logging and new
RollupControl__mdt.IsRollupLoggingEnabled__c
field to toggle on/off. In particular, there's an emphasis on providing information in two parts - the "gathering" phase ofRollup
, before it goes async, and the "acting" part ofRollup
, with information about each parent-level item being rolled up. This toggle should only be enabled while testing, as it will balloon your debug log size and negatively impact performance. -
patched holes in current RollupCalculator functionality for full recalculation routes that weren't already covered (so, everything besides average/first/last)
-
Added baseBaseCalculation method in RollupCalculator to deal with the possibility of rollups where the evaluator filters out all calc items necessitating a full recalc - which would not have happened for String and Number-based rollups previously
-
Fixes #97 by properly handling unwriteable fields in recursive check
-
Thanks to @mickster04, who added safe guards when migrating from DLRS (#98)
Performance Tweaks
- Additional cleanup spurred by having temporarily moved each Rollup's instance
eval
evaluator variable to be non-final, which in addition to being bothersome exposed some hand-off issues between the batch class version of Rollup and its queueable inner class. This also revealed a few spots where theRollupControl__mdt
was being fetched twice for no reason. - Introduced an explanatory comment on the
Database.executeBatch
section of Rollup'srunCalc
method, as a newcomer might find themselves ... wondering ... why we were re-initializing the class 😅🔍 - small heap size improvement in
RollupEvaluator
(cc @ssk42, in the event you had broken ground there, but this shouldn't be a merge-conflict scenario of any kind); holdover from #91; empty object pattern (AlwaysTrueEvaluator
) should always be implemented as a singleton
Automate Build Pipeline & Rollup Control Updates
- Fixes #88 by automating build pipeline for package version creation, promotion, and replacement in README
- BREAKING CHANGE
RollupControl__mdt.MaxQueryRows__c
updated toRollupControl__mdt.MaxNumberOfQueries__c
- this field was improperly named as part of v1.1.2, to my chagrin. The concept for "Max Query Rows" was already encapsulated inRollupControl__mdt.MaxLookupRowsBeforeBatching__c
field - Fixed a bug reported by Katherine West where
RollupFullBatchRecalculator
would not properly reset field values when batching - this issue was exacerbated by the "Max Query Rows" updates, above; batching was happening way earlier than it should have because the limit thatRollup
was looking to was 100 instead of 3000 (the default forMaxLookupRowsBeforeBatching__c
- Some more tooling on how
RollupEvaluator
gets initialized/passed around withinRollup
itself, specifically in regards to the recursion detection released in #91