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

Should not need to mark Active to do a manual Calculation #359

Closed
JimBTek opened this issue Jul 26, 2016 · 7 comments
Closed

Should not need to mark Active to do a manual Calculation #359

JimBTek opened this issue Jul 26, 2016 · 7 comments

Comments

@JimBTek
Copy link
Collaborator

JimBTek commented Jul 26, 2016

If you have a rollup set to Calculate Mode: Scheduled you cannot use the Calculate button to test and calculate immediately unless the Active checkbox is set to True which forces you to deploy Triggers.

However I have tested you can deploy the Triggers, Activated the Rollup, then delete/remove the Triggers and do a manual Calculate and it works correctly.

I believe the fix is to change the error/warning to not block doing a manual Calculate if Active is not True.

@JimBTek JimBTek added the bug label Jul 26, 2016
@JimBTek
Copy link
Collaborator Author

JimBTek commented Jul 26, 2016

I believe changing line 101 of RollupService.cls to:

if((lookup.Active==null || lookup.Active==false) && lookup.CalculationMode=='Realtime' )

could work, and am working on testing

@afawcett
Copy link
Collaborator

Oooh thanks @JimBTek , look forward to hearing more for this! 👍

@JimBTek
Copy link
Collaborator Author

JimBTek commented Aug 1, 2016

OK so along with the Above code if I change in RollupServiceTest3.cls
274 - 'rollupSummary.CalculationMode__c = 'Realtime';'

Then the tests pass and it does indeed work properly on a scheduled mode Rollup. I am guessing I could be breaking something else?

@afawcett is there anything else I should check before submitting a pull request? I plan on testing a Realtime rollup and make sure it works and i did not break it.

@afawcett
Copy link
Collaborator

afawcett commented Aug 3, 2016

This looks ok, so i guess what we are saying here is if its realtime, it has to be active, since if you run the job and then don't activate for a few hours things will be out of sync. However if your in scheduled or other modes your already accepting that lag. So yes, i think your code change makes technical and logical sense... 👍

@JimBTek
Copy link
Collaborator Author

JimBTek commented Aug 3, 2016

yeah, or the other route is to set it to active without requiring the
triggers being deployed if it's not realtime, so you can track which ones
are Active vs. not active, but I think if you are calling a rollup from
Process or a Schedule that is where you would activate or deactivate vs. on
the rollup itself.

I'll send a pull request

Best,

Jim Bartek
BTek Ventures, LLC
317-292-6301
BTekVentures.com

On Wed, Aug 3, 2016 at 2:39 PM, Andrew Fawcett [email protected]
wrote:

This looks ok, so i guess what we are saying here is if its realtime, it
has to be active, since if you run the job and then don't activate for a
few hours things will be out of sync. However if your in scheduled or other
modes your already accepting that lag. So yes, i think your code change
makes technical and logical sense... 👍


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#359 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABHzGzdtuPN0G0_v9SD7fkyz30-z9IBNks5qcOBXgaJpZM4JVrL0
.

@JimBTek
Copy link
Collaborator Author

JimBTek commented Aug 8, 2016

pull request: #369

@afawcett
Copy link
Collaborator

Fixed in v2.5.

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