Releases: jamessimone/apex-rollup
Releases · jamessimone/apex-rollup
v1.3.3 - Doc Updates & Run Calc Bugfix
- Updating documentation - shuffled some README items around to hopefully improve setup/usage clarity. Also started linking to Wiki articles where possible
- Fix for #167 to prevent NPE in
runCalc()
invocation
v1.3.2 - Added RollupFinalizer & full recalc bugfixes
- Added
RollupFinalizer
which will allow for more instances of graceful recovery in the event that you are at your limit for queueable jobs within a singular transaction - Fixes #165 by addressing IN/NOT in query syntax issues for bulk recalcs
- Fixes #164 by adding support for multi-character concat delimiters
- Fixed an issue reported by Fred Seyffert where it was possible for calc items sharing the same lookup key across full recalc batches to occasionally receive the incorrect rolled up value
- Added in eslint and husky with pre-commit automation for prettier, PMD, and linting - thanks to @jongpie for the huge assist on this one!
- Completed lazy-loading for all optional class properties in
Rollup
andRollupAsyncProcessor
to further cut down on heap-size wherever possible
V1.3.1 - Heap Size Improvements, Deferred Rollup Bugfix
Doing some cleanup on the v1.3.0 release -
- making the pipeline more resilient by hardening the
scripts/build-and-promote-package.ps1
ability to find the prior package version - removing some duplication between
deploy.yml
andpackage.json
npm scripts - removed
this.syncRollups
property fromRollupAsyncProcessor
to cut down on heap size, maderunCalc
logic easier to follow - Fix deferred rollup issue where a queueable with multiple targets turns into a batch job without regard for the batch job's lookup items not all matching the inner rollups lookup SObjectType (and field references, accordingly) - reported by Katherine West
Stable Plugins & Rollup Callback Plugin Released
💥 Breaking changes 💥
For subscribers utilizing the existing Rollup Logging Plugins packages:
RollupLoggerPlugin__mdt
updated toRollupPlugin__mdt
RollupLoggerPluginParameter__mdt
updated toRollupPluginParameter__mdt
- Existing users of Custom Object Rollup Logger and Rollup Logger Nebula Adapter need to uninstall the prior versions of the rollup logging plugins prior to upgrading to the new package version and updated logging plugins.
- Any custom users who implemented their own logging implementations using
RollupLoggerPluginParameter__mdt
need to comment out those (and anyRollupLoggerPluginParameter__mdt
) references in their custom implementation (you can update them toRollupPlugin__mdt
andRollupPluginParameter__mdt
after upgrading) - Users can also feel free to delete
RollupControl__mdt.RollupLoggerName__c
- this field has been deprecated since v1.2.34, but I probably could have done a better job of calling out that change
🔥 Updates 🔥
- Add functionality for subscribers to respond to parent-level updates using a new Rollup Callback plugin! By installing this section, you can choose to respond to an included Platform Event,
RollupCallbackEvent__e
, or to roll your own callback to call Apex/Flow accordingly. An example implementation of using this platform event to update a record flexipage with an alert that rolled up values have been updated since the page was loaded is included in the documentation (fixes #152). For more info, check out the overall README and the plugin-specific README 🚀 - Fixes #149 by properly resetting parent-level rollup fields when there are no matching calc items
- Several bugfixes related to edge cases with merging/full recalc code paths
- Added PMD through sfdx-scanner
- Added License icon to README 😇
Multi-currency rollup support & bugfixes
- @jongpie led the charge on fixing #156 by introducing basic multi-currency support - all orgs that don't make use of advanced currency management in conjunction with
DatedConversionRate
can now perform multi-currency rollups successfully (see the "Multi-Currency Orgs" section of the README for further info - fixed #158 by properly referring to
FlowBulkProcessor
default properties - fixed #159 by properly handling hierarchical rollups that don't make use of the Grandparent Relationship Field Path field
- fixed an issue in
RollupEvaluator
where if the value being evaluated had some text that matched its field name, part of the value could get stripped away - resulting in both false positives and false negatives! - fixed #155 & #160 by tracking which parent-level fields have already been reset as part of a full recalculation
- tweaked the logging in
RollupEvaluator
- now, at theFINEST
logging level, you can get extremely granular insight into how where clauses match on records; at theFINER
level, you'll see high-level match details for a record, including which evaluators were used to perform the matching logic
Full Recalc Bulkification, COUNT_DISTINCT bugfixes & NOT LIKE support
- Now that test classes are consolidated in the
extra-tests
directory, consolidatedRollupIntegrationTests
andRollupStandardIntegrationTests
- Created new test class,
RollupFullRecalcTests
and shuffled tests around so that the ones related to full recalc are housed there - as full recalculations were a big part of this update, it made sense to start running those tests under one roof - started working on #149 (and updated
extra-tests/flows/Rollup_Integration_Parent_Where_Clause_Filtering.flow-meta.xml
as a result), but ended up leaving a commented out assert inInvocableDrivenTests
to return to post-release - Shuffled some helper methods that previously only lived in
RollupTests
intoRollupTestUtils
to better organize things and allow for code reuse - As part of full recalc work, introduced
RollupDeferredFullRecalcProcessor
, which drastically speeds up full recalc runs by deferring the queries that retrieve all calc items till async mode has begun. Also introducedRollupAsyncProcessor.FullRecalcProcessor
as a base type for this object and forRollupFullBatchRecalculator
- fixed an
AFTER_DELETE
bug reported by Katherine West caused by some of the prework to bulkfying full recalcs over eagerly firing for non-merges - added proper query support for NOT LIKE (and notes in the README for this special syntax) - now the transformed syntax works in both
RollupEvaluator
and in downstream queries - Fixed a number of
COUNT_DISTINCT
bugs
Many thanks once more to @jongpie for the code review!
Massive Flow Improvements
- bulkified full recalc code path with Invocables (
REFRESH
context), which involved some fun additional query parsing/formation - also allowed for further Flow efficiencies to be found - added a REFRESH action to the existing end-to-end Flow and a test for it in
InvocableDrivenTests
- fixed a bug in
RollupCalculator
where filtering on a non-filterable field (likeCase.Description
) would bomb out the query - removed some extraneous
Rollup.defaultControl
lines in test classes now that test classes aren't installed with the 2GP package - fixed an issue reported by Katherine West where in the odd event (still mostly not understood how) where a Rollup starts to run associated with a different set of records than the metadata it's associated with, the Rollup doesn't try to actually run given the mismatch
- fixed bug in
RollupRelationshipFieldFinder
brought on by the research put into reconstituting where clauses with nested conditionals while bulkifying the Invocable full recalc code path
Thanks to @jongpie for the excellent code review on this one!
Annotation updates & Requeue bugfix
- changing
testVisible
toTestVisible
, andisTest
toIsTest
- (cc @gdoenlen) - moved
toString
def toRollup
base class - Moved all test classes to
extra-tests/
directory - fixed requeue issue reported by Katherine West
Rollup Logger Enhancements
- Reworked rollup logger plugins to normalize the way that logging plugins are customized and interacted with. Added
Rollup Logger Plugin
andRollup Logger Plugin Parameter
Custom Metadata types to aid with this process. More information can be found in the Rollup Logging section of the README- Rollup now logs a variety of messages at different
LoggingLevel
permutations - FINEST, FINER, DEBUG, WARN, and ERROR are all validLoggingLevel
selections (can be customized with theCustom Object Rollup Logger
unmanaged package, or while using the built in Apex Debugger and the newly providedRollupLoggerPluginParameter.LoggingDebugLevel
CMDT record
- Rollup now logs a variety of messages at different
- Added sync override for invocables - you can now perform rollup calculations synchronously, if desired. Defaults to false, set to
{!$GlobalConstant.True}
to have calculations performed sync (and mind the README, again; ifDefer Processing?
is also set to true, will only run sync once theProcessed Deferred Rollups
action is called - fixed a bug reported by Katherine West where deferring rollups (typically when over the current query limit) could fail to requeue if they preferred to run as a Queueable but
Limits.getLimitQueueableJobs() > Limits.getQueueableJobs()
Rollup Goes On a Diet
- Fixes #146 by going further down the rollup orchestrator/conductor path - the 'outer' rollup (previously referred to as the batchRollup - deprecating that term so that it's clear when a rollup is batched versus queued versus run sync) now 'conducts' the inner rollups by storing the calcItems and oldCalcItems map. This should drastically reduce memory consumption by basically eliminating how many List copies are being passed around in memory; whereas previously, the more CMDT/Rollup invocations you used, the more Lists were stored, now the outer rollup condenses that information into one place.
- Avoids a possible string overflow exception when using the Custom Rollup Logger
- Restores the packaging script to its former glory, including a more consistent update to the
README
when the package version is updated!