Automation Rule to sum "Original Estimate" from subtasks

Tiago S. February 20, 2025

Hi,

I'm working on an Automation Rule, to sum all values from "Original Estimate" field from every subtask, and return the result in the same field of the parent issue.

I took a hint on this community post.  Here I got the line of code to perform the calculation.


The rule is intented to work like this:

  1. The trigger is to create/make any edit to the issue 
  2. Branch for Parent
  3. Perform the calculation and return the result

The task has 9 subtasks. For each of them I put 1 hour as Original Estimate, to make 9 hours in total, and make it easier to se if the rule could work.

The rule actually works; as I edit any of the subtasks' Original Estimate, the value for the task is updated.

Problem is, the result doesn't make sense.

Using the following line of code

{{#=}}{{issue.subtasks.Original Estimate.sum}}/3600{{/}}

with 9 hours in total from the subtasks, I get "9m" or 9 minutes, a as a result.

 

What am I doing wrong with this rule?

Thanks in advance.

 


Pictures -

  1. Issue with subtasks
    image.png
  2. Closer look at the result
    image.png

  3. Rule as seen in rule builder
    image.png

  4. Trigger settings
    image.png

  5. Branch settings
    image.png

  6. Action settings
    image.png

3 answers

1 accepted

0 votes
Answer accepted
Pasam Venkateshwarrao
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.
February 20, 2025

Hi @Tiago S. 

 

Thanks for reaching out to the community

you can try this automation rule

Rule step-1.pngRule step-2.pngRule step-4.png

 

 

Hope this helps to achieve your query

Tiago S. February 21, 2025

Hi @Pasam Venkateshwarrao 

I made the rule following your example, and it worked fine.
For the given values (9 subtasks with 1 hour for each Original Estimate), the result is 1d 1h.
As far as I know, 1d = 8h by JIRA standards, then it's correct,

image.png

Thanks for your answer.


Pasam Venkateshwarrao
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.
February 21, 2025

Hi @Tiago S. 

 

if it working fine for you can you hit Accept Answer and Like so that it will be helpful to others to reach.

 

 

Like Tiago S. likes this
0 votes
Duc Thang TRAN
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.
February 20, 2025

Hello @Tiago S. 

Can you try with this smart value ?

{{#=}}{{issue.subtasks.timetracking.originalEstimateSeconds.sum}}/3600{{/}}

 

Tiago S. February 21, 2025

Hi @Duc Thang TRAN 

Thanks for your answer.

Unfortunatelly, the smart value didn't work. 

0 votes
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.
February 20, 2025

@Tiago S. 

Can you check the original time estimate entered at subtask level?

Do you see 1m or 1h in subtasks?

Tiago S. February 21, 2025

Hi @Vishal Biyani ,

Thanks for your answer.

I put 1h for each of the subtasks. I thought the error could have something to do with the units. For instance, I removed "/3600" from

{{#=}}{{issue.subtasks.Original Estimate.sum}}/3600{{/}}

making it

{{#=}}{{issue.subtasks.Original Estimate.sum}}{{/}}

As a result, I got 

13w 4d 2h

Truth to be told, I'm not into JIRA Automation, then I don't have any idea on what happened here. 

Thanks again for reaching out.

 

Suggest an answer

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

Atlassian Community Events