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

Issue #229 - Ensure context is shared when rollups differ by case only #231

Conversation

jondavis9898
Copy link
Contributor

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.

Note that this commit contains extra debug statements to make observing
actual vs expected result easier.  The debug statements will be removed
if this issue is determined to be valid and PR accepted.
…er by case only

Additional debug statements have been removed from tests in this commit.
afawcett added a commit that referenced this pull request Aug 27, 2015
…n-case-different

Issue #229 - Ensure context is shared when rollups differ by case only
@afawcett afawcett merged commit 80406ca into SFDO-Community:master Aug 27, 2015
@afawcett
Copy link
Collaborator

Once again an awesome dedication to test coverage! 👍

@jondavis9898 jondavis9898 deleted the issue229-extra-contexts-when-case-different branch August 27, 2015 15:14
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.

2 participants