Issue #229 - Ensure context is shared when rollups differ by case only #231
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See commit jondavis9898@1633b43 for tests that demonstrate issue.
See commit jondavis9898@023ae41 for proposed fix.
Fix includes a proactive vs. reactive change to update all "Describable" LookupRollupSummary__c fields to their Describe name. With this in place, the "toLowerCase" on the contextKey is not really needed (avoiding it would save some CPU cycles) but is included for legacy support as it would take an update to existing rollups to trigger the field values to be updated with proper describe names. Not sure its possible (not too familiar with managed package installs) but possibly a post-script to update field values on install of next release could be included and the change to RollupService.cls eliminated instead of incurring the toLowerCase processing.
As an example, the fix changes the result of test testLimitsAndContextsUsedMultipleAggregateRollupsDifferByCaseOnlySameCriteriaSameCase
from:
Queries - before:4 after:7
QueryRows - before:2 after:22
DMLRows - before:5 after:17
to:
Queries - before:4 after:6
QueryRows - before:2 after:13
DMLRows - before:5 after:17
Note that test cases ending in "DiffCase" and "OrderBy" will pass with current code base. They are included for ensuring full test coverage but this PR does not effect their outcome.