I've created an automation, manual trigger for now, and please avoid the logs as I was debugging. I see the issue is on the Edit Issue Action.
{{lookupIssues.timetracking.timeSpentSeconds.sum.divide(3600).divide(lookupIssues.timetracking.timeSpentSeconds.sum.divide(3600).add(lookupIssues.timetracking.remainingEstimateSeconds.sum.divide(3600))).multiply(100).round}}
It's providing an incorrect calculation of 900%. Here is my audit log.
Here is my automation
Short answer: I recommend using the longer math format for this calculation, such as with this:
{{#=}}ROUND( {{lookupIssues.timetracking.timeSpentSeconds.sum}} / ( {{lookupIssues.timetracking.timeSpentSeconds.sum}} + {{lookupIssues.timetracking.remainingEstimateSeconds.sum}} ) * 100, 0){{/}}
As a percentage is needed, dividing by 3600 for each value may be removed.
For the rule symptom...
I hypothesize there are two things causing the incorrect value: a racetrack error / order of processing, and inline math performing integer division.
Kind regards,
Bill
Bill, I plugged in the automation and it worked swimmingly. thank you for cutting to the chase. I'm going to take a minute to process my solution vs your solution and the information you presented. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can I clarify, what are you trying to calculate within the Automation Rule?
Is it the percentage of time left based on original estimate vs remaining estimate? Or is it based on time spent vs original estimate?
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. I'm trying to sum up all children task to get this equation:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.