apex-rollup
apex-rollup copied to clipboard
Rollup Full Recalc sometimes edits parent records even when no rollup fields were changed
When running full recalc from the Rollup app, some parent records will be "updated" (aka DML) even though no rollup fields have changed. This can cause issues with triggered automation on those parent records (in my situation, other rollups from that object to another).
It seems to be doing this only for parent records that have related child records, but none that match the criteria in the where clause. Because of this, the parent records' rollup fields are null (which is correct), and rollup tries to update them to null, which is not necessary.
Thanks for your help!
@solo-1234 thanks for logging this. as per our conversation last week, I have a good idea about how this issue could occur and should be able to quickly implement a fix.
Awesome, thanks for the update!
@solo-1234 I've made a change that tentatively may address this. Looking forward to your feedback!
Just following up on this to see if you have any updates, thanks!
@solo-1234 I'll re-open, for now. I will have a reduced scheduled for open source work the next ~week or so. I've been trying to finish up #353 before that and haven't had the chance to dig in again on this one.
Not a problem - I just saw it mentioned in some activity and was wondering what it was. Thanks!
Closing after talking to solo on Discord - the issue was with parent records still having 0 (which previously was the default value for number-based rollups, but had since been changed to null
to align with how aggregate queries work in SOQL)