Skip to content

Releases: jamessimone/apex-rollup

COUNT reparenting bugfix & better separation of concerns

26 May 22:01
3c615e5
Compare
Choose a tag to compare
  • 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

24 May 22:56
3582a69
Compare
Choose a tag to compare
  • Fixes #107 by correctly deferring calc items per lookup item if limits are exceeded
  • Fixes #108 by adding record flexipage full recalc button for parent records
  • Fixes #109 by correctly checking for null on base invocable code path

Concat Bugfixes

20 May 13:43
5d97a9c
Compare
Choose a tag to compare
  • Fix concat delimiter misplacement reported by Katherine West

DLRS migration script updates, tech debt cleanup

18 May 15:06
0c64acf
Compare
Choose a tag to compare
  • Updated DLRS migration script thanks to @mickster04 to helpfully print out the DLRS rules associated with objects like Task, Event, and User that are not supported via CMDT in Rollup 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 generic RollupMetaPicklists.cls. You can feel free to delete RollupShouldRunAsPicklist.cls after upgrading

FIRST/LAST Where Field Updates & WhereFieldEvaluator Caching

14 May 13:53
5781ca5
Compare
Choose a tag to compare

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

13 May 21:35
6fc7c23
Compare
Choose a tag to compare
  • 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

12 May 19:52
4e86038
Compare
Choose a tag to compare
  • Added RollupTestUtils.cls to centralize mocking Id creation
  • Added RollupRecursionItem.cls to properly encapsulate equals() and hashCode() 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

11 May 14:09
159519e
Compare
Choose a tag to compare
  • 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 of Rollup, before it goes async, and the "acting" part of Rollup, 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

05 May 15:23
e0bc123
Compare
Choose a tag to compare
  • 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 the RollupControl__mdt was being fetched twice for no reason.
  • Introduced an explanatory comment on the Database.executeBatch section of Rollup's runCalc 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

04 May 21:05
361e899
Compare
Choose a tag to compare
  • Fixes #88 by automating build pipeline for package version creation, promotion, and replacement in README
  • BREAKING CHANGE RollupControl__mdt.MaxQueryRows__c updated to RollupControl__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 in RollupControl__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 that Rollup was looking to was 100 instead of 3000 (the default for MaxLookupRowsBeforeBatching__c
  • Some more tooling on how RollupEvaluator gets initialized/passed around within Rollup itself, specifically in regards to the recursion detection released in #91