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,294,621
Community Members
 
Community Events
165
Community Groups

Atlympics - Automation - Calculate the sum of original estimate of all Epic's subissues

Alex Koxaras Community Leader Aug 03, 2021

Hi all!

This is my repost of my original post, which you can read here:

This automation solves the problem of calculating the sum of the original estimate of all issue types of an epic, without the use of an addon. Keep in mind that I had 4 different issue types (standard tasks) from which I wanted to sum up all original estimates and not story points.

Rule

Below you will find my rule, which after testing it, it works like a charm:

Rule01.png

So what the above rule does is that

  • Step 1: It tracks changes on Time Tracking
  • Step 2: Rule keeps going only if the trigger issue type is specific
  • Step 3: Get the original estimate value of the trigger issue and copy it on the Story Point field
  • Step 4: Create a branch for the parent of these issue types
  • Step 5: Looks up to find all issues with the parent Epic Link
  • Step 6: Sums up the story points of the Epic's children and copy it on the Original Estimate field

Rule Break Down

Below you will find each individual rule component.

Step 3

rule02 (edit story points).png

{{issue.fields.timetracking.originalEstimateSeconds.divide(60)}}

Step 5

rule03 (lookupissues).png

{{lookupIssues.Story Points.sum}}

Ending Note

I though to end this article by presenting to you the pros and cons of this rule:

Pros

  • It delivers and works!

Cons

  • Uses an extra field (story points) to do the copy/paste thus,
  • This rule takes 3 to 4 seconds in duration (which I think is significant)
  • Makes Story Point field obsolete, since it is used in the calculation, thus,
  • You can't use any chart that uses story point

Cheers,
Alex

3 comments

@Alex Koxaras , thanks for sharing! Much appreciated. I think except the Story Point field as obsolete which might raise some concerns other cons might be acceptable.

Cheers

Suvradip

Like # people like this
Alex Koxaras Community Leader Aug 04, 2021

It depends on the cons. 3-4 secs of processing time is rather unacceptable to be honest. Keep in mind that you have only 3600 secs of processing time every 12 hours. So this is troublesome if you have a large number of issues that needs to be processed.

Hi Alex,

As you note about performance and usage limits, I wonder: how often do you need this information updated?

Just-in-time updates are awesome when the benefit justifies the cost.  If you could live with accuracy of perhaps once-per-day, the rule could be converted to use a scheduled trigger.  And the rule could be fired manually, as needed, for a quick refresh between cycles.

Or perhaps investigate if using the REST API directly from the rule with an issue search is faster than LookupIssues to gather and sum the data with list functions.

Best regards,
Bill

Like Alex Koxaras likes this
Alex Koxaras Community Leader Aug 04, 2021

With my experience, this field is something that should be up-to-date any time someone opens an issue to view it. If estimates are updated once a day, then yes, once-per-day is something that I could live with it. But if you have multiple projects, with multiple teams, this possible wouldn't work.

REST API would be definitely a good workaround, to avoid these automation limits.

Thanx for pitching in your ideas @Bill Sheboy! Always good to listen to your opinion!

Like Bill Sheboy likes this
Bridget Community Manager Aug 03, 2021

@Alex Koxaras thank you so much for your submission! 🔥

Like Alex Koxaras likes this
Alex Koxaras Community Leader Aug 04, 2021

My pleasure! :D

Liam Green Community Leader Aug 04, 2021

Thanks @Alex Koxaras - bookmarking this for when I'm queried on how to do it!

Like Alex Koxaras likes this
Alex Koxaras Community Leader Aug 04, 2021

I'm thrilled to know that this will end up on someone's bookmarks! I'm really glad that you've found this useful!

Comment

Log in or Sign up to comment
TAGS

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