Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,998
Community Members
 
Community Events
165
Community Groups

rollup original estimate at epic level

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

1 vote
Answer accepted

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

@Michael Marriott 

Thanks Michael for your solution. This is really helpful

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

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.

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?

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.

@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

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

@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

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
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,923 views 37 49
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you