Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using automation to sum up estimation

Nitzan Matalon October 18, 2022

Hey everyone

im using automation to sum up the original estimate (I'm using Jira's structured field) for stories to a custom field. The problem is when I enter an estimation that is not an integer (for example 1.5 hours) it rounds down the number in the custom field to 1 hour.

How can I prevent the rounding?

Thank you

1 answer

1 accepted

0 votes
Answer accepted
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.
October 18, 2022

Hi @Nitzan Matalon 

For a question like this, please post images of your complete rule, showing the details of any calculations in the edits, and of the audit log showing the details of the execution.  That will provide context for the community to suggest ideas.

Until we see that...I suspect you either have a missing or incorrect unit of measure for the time units at the place the math is occurring.

Kind regards,
Bill

Nitzan Matalon October 18, 2022

Hey Bill, 

Thank you for your answer. This is my complete rule:

jira.jpg

I'm trying to sum up the subtasks' original estimate to a custom field "Updated Estimate" in the parent stories.

When I enter a rounded hour for example 2 hours it works fine and I get the number 2, but when I enter for example 30mins it rounds to 0, 1.5 hours is rounded to 1.

Thank you

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.
October 19, 2022

What is the type of your Updated Estimate field?

If you write that smart value expression (used in the edit) to the audit log, what do you see as the value: the rounded one, the unrounded, or something else?

Nitzan Matalon October 19, 2022

What exactly do you mean?

This is an image of the audit log when I changed the Original Estimate of the subtask to 30mins. I'm not sure I understood you correctly

צילום מסך 2022-10-20 093840.jpg

Nitzan Matalon October 20, 2022

And the type of Updated Estimate field is number

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.
October 20, 2022

What I believe is happening is because Original Estimate is an integer (number of whole seconds), that type is being used for the rest of the expression.

To break that typing-chain and use a non-integer, try a math expression, such as this:

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

Nitzan Matalon October 20, 2022

That worked perfectly!

Thank you very much!!

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events