Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.6.25 - Adds support for distinct sums, averages, and more #587

Merged
merged 5 commits into from
May 2, 2024

Conversation

jamessimone
Copy link
Owner

  • As discussed in Expanding DISTINCT to AVERAGE and SUM #583, adds support for distinct rollups via Rollup__mdt.IsDistinct__c. Technically, a CONCAT-based rollup can now supply this flag instead of using the CONCAT_DISTINCT rollup operation value, but I am leaving support for CONCAT_DISTINCT in order to not make this a breaking change
  • This change also has the notable benefit of abstracting most of the logic in RollupCalculator that was previously SObject-based, which will allow me to continue work on a feature that was requested last year (which I have not had time to get back to): the ability to "group" rollup operations (so, taking sums from two different children/two different children fields and applying them to the same parent field, or even wilder: taking the max of two sums and applying the winner to a parent field). While this work is still to come, this release paves the way for that functionality

Copy link

codecov bot commented May 2, 2024

Codecov Report

Attention: Patch coverage is 99.51220% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 96.59%. Comparing base (366ca57) to head (d88ae63).
Report is 1 commits behind head on main.

❗ Current head d88ae63 differs from pull request most recent head 6a3c463. Consider uploading reports for the commit 6a3c463 to get more accurate results

Files Patch % Lines
rollup/core/classes/RollupCalculator.cls 99.48% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #587      +/-   ##
==========================================
- Coverage   96.60%   96.59%   -0.01%     
==========================================
  Files          32       32              
  Lines        6684     6705      +21     
  Branches       61       61              
==========================================
+ Hits         6457     6477      +20     
- Misses        222      223       +1     
  Partials        5        5              
Flag Coverage Δ
Apex 96.83% <99.51%> (-0.01%) ⬇️
LWC 92.02% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamessimone jamessimone merged commit 908512e into main May 2, 2024
1 check passed
@jamessimone jamessimone deleted the v1.6.25 branch May 2, 2024 17:42
jamessimone added a commit that referenced this pull request May 3, 2024
@systemsfixer
Copy link

Exciting! I read the blog post about this refactor 👍
I'm glad that this paves the way for grouped roll-ups!

@jamessimone
Copy link
Owner Author

@systemsfixer I know it's been a while since we spoke about them, but I'm excited to make progress now!

jamessimone added a commit that referenced this pull request May 17, 2024
…592)

* Tidies up #587
* Creates RollupGrouping__mdt custom metadata type to allow multiple rollup operations to roll up to the same field
* Fixes #589 with proper stateful tracking for batches, with the potential to roll this out to SUM/COUNT operations in the future as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants