jamessimone / apex-rollup

Fast, configurable, elastically scaling custom rollup solution. Apex Invocable action, one-liner Apex trigger/CMDT-driven logic, and scheduled Apex-ready.
MIT License
210 stars 30 forks source link

When reparenting child records, rollup not calculating correctly on old parent record #514

Closed baobao917 closed 9 months ago

baobao917 commented 11 months ago

When changing the parent (Parent 1) on a child record(s) to a new parent (Parent 2), the rollup calculation on the old parent (Parent 1) is not calculating correctly.

Please see video.

https://www.loom.com/share/8636d7cf96164f05a14e4cf761010ec2?sid=cc8b9063-5a81-4144-8e30-2b520fb654b8

Parent 1 (before reparenting) image

Parent 2 (after reparenting) image

jamessimone commented 10 months ago

I had a preliminary fix for this lined up for v1.6.1 but ended up backing it out for that release because it would only have worked for the case @baobao917 had brought up, and not all cases generally. I plan to complete this work in the next version.

baobao917 commented 9 months ago

Hi @jamessimone I tested this issue and there still is a calculation error on the old parent. Pls see video below.

https://www.loom.com/share/1268bd6b971b4600be5eb7b96892d423?sid=ac3b3389-1b85-45c7-9d7f-4859a6ae6417

I don't seem to be able to reopen this issue. What do you want me to do?

P.S. I left a comment on here earlier (which I've deleted) stating I tested this and it was fixed but that comment was meant for another issue (Issue #518 ). Hopefully that didn't confuse you.

baobao917 commented 9 months ago

@jamessimone Excellent! Tested this against v1.6.3 and the old parent calculated correctly! Thanks!

jamessimone commented 9 months ago

@baobao917 great! I had tested this in your UAT environment prior to closing, glad we got this one sorted out.