rollup original estimate at epic level

Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 15, 2021

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.

2 answers

1 accepted

4 votes
Answer accepted
Michael Marriott April 4, 2022

I did it as follows;

Created this rule for changing the Story Estimate when a sub task estimate changed

Screen Shot 2022-04-04 at 17.49.42.png

Action is: {{#=}}{{issue.subtasks.original estimate.sum}} / 60{{/}}

Then,

Created this rule for changing the Epic Estimate when Story estimate changes

Screen Shot 2022-04-04 at 17.42.57.png

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

Screen Shot 2022-04-04 at 17.52.14.png

Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 7, 2022

@Michael Marriott 

Thanks Michael for your solution. This is really helpful

Nab Khan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 15, 2022

@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.

Michael Marriott April 15, 2022

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.

Nab Khan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 15, 2022

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?

Michael Marriott April 15, 2022

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.

Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 18, 2022

@Michael Marriott 

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

Jonathan Rauscher March 2, 2023

@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.

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2021

Hi @Vishal Biyani 

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

Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2021

@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{{/}} {{/}}
snip1.JPG

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2021

Hi @Vishal Biyani 

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:

  • Iteratively adding to the epic's fields and the re-fetching the epic.  This can be slow and error-prone.
  • Repurposing a field like Story Points, by copying the Story's original estimate into the field, and then use Lookup Issues actions to more easily sum the values.

Best regards,
Bill

Suggest an answer

Log in or Sign up to answer