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

Rollup not recalculated when order by field changes #240

Closed
jondavis9898 opened this issue Aug 30, 2015 · 4 comments
Closed

Rollup not recalculated when order by field changes #240

jondavis9898 opened this issue Aug 30, 2015 · 4 comments

Comments

@jondavis9898
Copy link
Contributor

When the order by field on a child record has changed, if no other field involved in the rollup has changed, the rollup is not recalculated. The reason for this is that the order by field is not included in fieldsToSearchForChanges (https://github.com/afawcett/declarative-lookup-rollup-summaries/blob/master/rolluptool/src/classes/RollupService.cls#L540). Order by influences query based rollups and therefore not including it could result in the rolled up value being incorrect.

Note that this issue existed prior to PR #227.

See 3f2d31e#diff-4aa41bc6f886aeba1cba33ce3962348cR1535 for demonstration of issue. This test fails with prior code base on line 3f2d31e#diff-4aa41bc6f886aeba1cba33ce3962348cR1535 because the change to Amount__c is not considered material to rollup processing.

jondavis9898 added a commit to jondavis9898/declarative-lookup-rollup-summaries that referenced this issue Aug 30, 2015
jondavis9898 added a commit to jondavis9898/declarative-lookup-rollup-summaries that referenced this issue Aug 30, 2015
@afawcett afawcett added the bug label Aug 30, 2015
@afawcett
Copy link
Collaborator

Thanks @jondavis9898 another good spot, this will be most acute on the concatenation based aggregate rollups as you say.

@afawcett
Copy link
Collaborator

@jondavis9898 PR 244 fixes this i think, yes?

@jondavis9898
Copy link
Contributor Author

Yep, this one is fixed in PR #244.

@afawcett
Copy link
Collaborator

Fixed in v1.24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants