Hi,
I'm working on an Automation Rule, to sum all values from "Original Estimate" field from every subtask, and return the result in the same field of the parent issue.
I took a hint on this community post. Here I got the line of code to perform the calculation.
The rule is intented to work like this:
The task has 9 subtasks. For each of them I put 1 hour as Original Estimate, to make 9 hours in total, and make it easier to se if the rule could work.
The rule actually works; as I edit any of the subtasks' Original Estimate, the value for the task is updated.
Problem is, the result doesn't make sense.
Using the following line of code
{{#=}}{{issue.subtasks.Original Estimate.sum}}/3600{{/}}
with 9 hours in total from the subtasks, I get "9m" or 9 minutes, a as a result.
What am I doing wrong with this rule?
Thanks in advance.
Pictures -
Hi @Tiago S_
Thanks for reaching out to the community
you can try this automation rule
Hope this helps to achieve your query
I made the rule following your example, and it worked fine.
For the given values (9 subtasks with 1 hour for each Original Estimate), the result is 1d 1h.
As far as I know, 1d = 8h by JIRA standards, then it's correct,
Thanks for your answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tiago S_
if it working fine for you can you hit Accept Answer and Like so that it will be helpful to others to reach.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Tiago S_
Can you try with this smart value ?
{{#=}}{{issue.subtasks.timetracking.originalEstimateSeconds.sum}}/3600{{/}}
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.
Hello @Tiago S_
After reading your config instance here is 2 way to do it
{{issue.subtasks.timetracking.originalEstimateSeconds.sum.divide(3600)}}h
{{#=}}{{issue.subtasks.timetracking.originalEstimateSeconds.sum}}/3600{{/}}h
But I don’t tknow why you need doing this calculation because by default, Jira sums up the estimates via the field {{issue.aggregatetimeoriginalestimate}}
.
If you copy all the estimates from your subtasks to the parent task, this field will end up doubling the total estimate.
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.
Can you check the original time estimate entered at subtask level?
Do you see 1m or 1h in subtasks?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vishal Biyani ,
Thanks for your answer.
I put 1h for each of the subtasks. I thought the error could have something to do with the units. For instance, I removed "/3600" from
{{#=}}{{issue.subtasks.Original Estimate.sum}}/3600{{/}}
making it
{{#=}}{{issue.subtasks.Original Estimate.sum}}{{/}}
As a result, I got
13w 4d 2h
Truth to be told, I'm not into JIRA Automation, then I don't have any idea on what happened here.
Thanks again for reaching out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.