Is there a way (using Jira automation) to roll-up original estimates from Standard Issue Types to linked Epic?
I tried to use the formula {{#=}}{{issue.remaining estimate.sum}} / 60{{/}}
when issue equals Story and Value changes for Time Tracking
then for Epic update custom filed = {{#=}}{{issue.remaining estimate.sum}} / 60{{/}}
but it does not work.
I did it as follows;
Created this rule for changing the Story Estimate when a sub task estimate changed
Action is: {{#=}}{{issue.subtasks.original estimate.sum}} / 60{{/}}
Then,
Created this rule for changing the Epic Estimate when Story estimate changes
In the last action step I used:
{{#=}}{{lookupIssues.original estimate.sum}} / 60{{/}}
Make sure you allow the first rule to trigger the second rule by setting;
'Allow Trigger' in the rule details of the second (Update Epic) rule
Thanks Michael for your solution. This is really helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Michael Marriott is there a way to add to story estimate when subtask estimate changes? For example, if story estimate is 2d, and a subtask is added to story with a subtask estimate of 3d, then story estimate gets updated to 5d? In your above example, story estimate gets set to 3d.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Nab Khan ,
Both these rules are triggered when the 'Original Estimate' field is changed in a sub task (updates Story) and a Story (Updates Epic if it exists). First rule will trigger the second rule if configured to do so.
If you 'move' an existing sub task to a Story then the rule will not trigger.
If you add a subtask to a story and then set the 'Original Estimate' the rule will sum all 'Original Estimate' fields for all sub tasks to the Parent task.
Any Original Estimate manually added to the Parent Task will be over-written.
Note; Automation can take time to fully complete all actions. In your example if you refresh the Story after rule completes execution you will see it will update to the 5d.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Michael Marriott ,
The rule does sum all 'Original Estimate' fields for all sub tasks to the Parent task, and overwrites the parent task 'Original Estimate' value with the sum.
What I would like to know is if it is possible to not overwrite but append.
For instance, if the parent task has an estimate of 5d and a new subtask is added with an estimate of 2d, can the original estimate on the parent task be set to 7d?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nab Khan
You could store the current value in a variable before doing the calculation and then include the variable in the calculation. I wouldn't do that since you will continually accumulate. For example if you remove a sub task or adjust it's value then the roll up value will be wrong since you will retain the old value and add the new value for the same sub task.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your feedback. Considering these complexities, i went ahead using python + JIRA REST API to read the summed up original estimates at standard issuetype level and after doing the calculation in code update the respective field value in the epic.
this helps avoid taking care of lot of scenarios like you mentioned in Jira automation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Michael Marriott you sir are a lifesaver! Just one minor adjustment: on the second rule's action math, an additional division by 60 was necessary.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Michael Marriott why division by 60 is important in this formulae ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kishan,
Ummm I can't recall really but I think it is because I noted that the sum returned a value in seconds and valued entered into this field is interpreted as minutes by default. So if you enter '60' into the field it will rewrite as '1h'. So the divide by 60 is so the sum is entered in a value representing the number of minutes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Michael Marriott , this is really helpful. I have just one more question, we do not create subtasks and work on Story / Task/ Bugs. I simply want the Story level estimates to sum and roll up to epics, so I applied the second automation rule only given in your answer.
However the sum at epic level is coming as 0, is there anything I should do get the values correctly ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What problem are you trying to solve? You note original estimate in your question, and then you show smart values for remaining estimate values.
If you need either of those things, please look at the links noted at the right-side of this post for earlier articles: Related Community content
And, to find the names of smart values which may not be noted in the documentation please review this how-to article: https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy Thanks for pointing this out. I have rectified this mistake. However, not able to meet the use case as detailed below
Under Epic, i have Stories, Task and Custom Standard issue time (say Use Case).
We have created custom fields at Epic level
Field Name: StoryEffort
Field Name: TaskEffort
Field Name: UseCaseEffort
Field Name: TotalEffort
with the objective to rollover aggregatetimeoriginalestimate of Stories , Task and Use Case in their respective field and then sum up the total effort
Under 1 epic i can have multiple stories.
When i use the below rule to populate StoryEffort, instead of summing up the aggregatetimeoriginalestimate for all stories, i get the aggregatetimeoriginalestimate for only the story for which the effort was updated.
Is there a way to write the formula such that i get some of all aggregatetimeoriginalestimate for all stories under an Epic, if the value changes for any 1 of the story.
i tried lookup issue as well, but it didn't yield any result.
{{#if(issue.issuetype.name, "Story")}} {{#=}}{{issue.aggregatetimeoriginalestimate}} / 3600{{/}} {{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may want to post your entire rule to provide more context. Thanks!
If you look at the examples in the related contents posts, you will see examples of rolling up the values. Generally this is done by either:
Best regards,
Bill
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.