How to sum up Original Estimates from sub-tasks to Parent

Sharon Youmans October 13, 2022

Hello,

I need automation to sum up the original estimates from the subtasks to the parent (story or bug) original estimate field on the parent. 

This is what i have in the automation so far but the last condition is failing: 

When: Value changes for 
Time Tracking

 

Issue Type equals: 
sub-task

 

For Parent

 

Then: Edit Issue Fields
Original Estimate 

{{issue.subtasks.original estimate.sum}}

3 answers

2 accepted

6 votes
Answer accepted
Sharon Youmans October 19, 2022

Hi Trudy,

Thanks for getting back to me. I did copy and paste it correctly.  I attached a copy of the rule, user story and tasks to view the total on the original estimates. we track by hours. 

I indicated it's h for hours on each issue. What's missing? the total on the user story is showing the minutes it seems. 

 

user story.jpgsubtask 3.pngsubtask 2.jpgsub task 1.jpgRule.jpg

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 13, 2022

Please show the message available in the Audit Log for the rule execution when it failed.

Sharon Youmans October 17, 2022

Hello, 

 

Here is a screenshot from thsum up estimates audit log.png. Please see attachment

Like Sergio Cantos likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 17, 2022
{{#=}}{{issue.subtasks.original estimate.sum}} / 60{{/}}

I've seen a few other posts that indicate users are successfully summing up subtask original estimates with that, and I tested it and confirmed it worked for me, for issues in a Company Managed project.

If the value isn't divided by 60 then the value in the parent issue is not correct.

Like # people like this
Sharon Youmans October 19, 2022

Thank you. i'll try this and let you know. 

Sharon Youmans October 19, 2022

I just tried and it worked but the total number of hours in the parent was really high. so the summation didnt work. I had three tasks,  one with 6h, the second 7h, and the third 8h. The total on parent was over 1000 hours. i don't recall the exact number. 

 

what do you mean by the parent issue is not correct? not sure i understand. 

Sharon Youmans October 19, 2022

{{#=}} what does this do? is this for advance search?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 19, 2022

{{#=}} is used to indicate you are providing a math expression. Refer to

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/

Please show us exactly what you added to your rule. I suspect you did not copy/paste it correctly.

What do I mean by "the parent issue is not correct"? 

The value that is stored in the Original Estimate field in the data base is seconds. The UI automatically adjusts that value to minutes/hours/days/weeks when it displays it.

In the UI if you entered a number in the Original Estimate field and did not specify the unit (i.e. h for hours) then the UI assumes that you are entering minutes.

When you use the Original Estimate field in the math expression it is pulling the value from the database, so it is pulling the value in seconds. However, when you set the value through the math expression then the system is assuming you mean minutes, like it would if you entered it in the UI. 

Because the value is stored in the database in seconds, the system multiplies the value, which it has assumed is minutes, by 60 to get the seconds.

If you omitted the "/ 60" part at the end of the math expression then when the value is assigned to the Original Estimate field in the parent issue it will be wrong because of the automatic multiplier. To accommodate that automatic multiplier, you have to divide by 60.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 19, 2022

@Sharon Youmans 

Oh, drat! I have mislead you a bit in my ignorance.

There is actually a global setting that determines the default unit of time for Time Tracking. You find it here:

https://<yourURL>/secure/admin/TimeTrackingAdmin.jspa

Your math expression has to accommodate for that.

In my system the default unit of time is Minutes. Since the data is stored in the database in seconds, I have to divide the number be 60 to get minutes.

Looking at the numbers you got, I am betting the default unit in your system is hours. In that case you would need to divide by 120 rather than 60 in the math expression.

Sharon Youmans October 19, 2022

@Trudy Claspill 

 

You maybe right, but that didnt solve it. I think there is something else that needs to be changed as well. I did some testing and provided screenshots below. First here is a screenshot of the time tracking admin page.  Second, i created another user story and added only 1 task and the original estimate 1h. Notice the total on the user story, it's showing 30h.user story v2.jpgsubtask 1.jpgTimetracking.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 19, 2022

I apologize again, this time for my sloppy math skills. I'll blame it on multi-tasking as I am currently working on 4 on-prem to cloud migrations in various stages while also trying to answer community questions :-\

 

You need to divide by 3600 to get the correct value, as there are 3600 seconds in an hour.

I have tested this out by changing my own system to using hours as the default time tracking unit, and entering various values (minutes, hours, and days) in the original estimate of the subtasks.

Like Phu Nguyen likes this
Sharon Youmans October 24, 2022

Hi Trudy,

Thanks for the response. Let me test with 3600. I think i did try doing that but I'll test again. I'll let you know. 

Sharon Youmans October 24, 2022

Hi, Trudy. It worked!! Thank you for your help. 

Like Bright Okereke likes this
Carlyle Brown December 29, 2022

I have tried the suggestions above however I am not seeing the Original Estimate rolling up to the Task. Please review my screen shots. You will see the automation was successful however when you look at the parent task the original time estimate is still zero

No Estimate.pngAuditLog.pngissue tree.png

 

ok after further attempts I calculations be shown on the Parent; however, the math is not correct see below:calculations.png

{{#=}}{{issue.subtasks.original estimate.sum.plus(task.issue.original estimate)}} /3600 {{/}}

 

Edit Board settings:board setting.png

Now Estimated Column is empty: calculations2.png

 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 30, 2022

@Carlyle Brown 

Please show the details for the step in your rule where you edit the Original Estimate.

Please show us the audit log for execution of the rule.

Please show us the setting in your system for Global Time Tracking Settings.

Carlyle Brown January 10, 2023

time.pnglog.pngote.png

Carlyle Brown January 10, 2023

I have three levels:

Epic

      Task

             Subtask

                        1

                        2

                        3

One two and 3 total Original Estimate = 10hours

10 hours is reflected in my Task Original Time Estimate

But that 10 Hours is not reflected in Epic, Epic shows 0 (Zero)

Bright Okereke June 26, 2023

Hi @Sharon Youmans 

 

Please can you share the updated automation for this that worked for you. I also want to set up mine

Thank you

pau_sort
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!
March 13, 2024

Hello @Carlyle Brown ,

 

Did you find a solution? I am trying to Sum Up the Original Estimate times from the Tasks to add it in the Epic but no solution.

 

Thank you.

Automation.png

0 votes
Zahlan Shafeer April 1, 2024

HI @Sharon Youmans @Trudy Claspill  I am trying to do the same but it is not working for me. Showing me an error. My Default unit for time tracking is hours. Can you please help.

sa.jpegSelected April 01 2024 2_29_45 PM.jpg

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 1, 2024

@Zahlan Shafeer 

Welcome to the Atlassian community.

When you update a post the only people who see the update are the original authors, the people who responded to the post, and anybody that elects to Watch the post.

To ensure your request for help gets maximum visibility in the Community it is a much better idea for you to start a brand new Question.

If there are existing posts that are relevant to your Question then you should provide links to those posts in your new Question.

And, here are a couple of tips for getting help with an Automation Rule:

  1. Show the entire Audit Log entry.
  2. Use the Log Action to print into the Audit Log any values, variables, and smart values you are trying to use.
  3. Show images of the details of the issues involved in your automation rule.
Like Zahlan Shafeer likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events