Original Estimate: smart value doesn't work if time is less than 1 hour

DS March 4, 2024

Hello every one

I built an automation to update a field related to the original estimate. 

But when i fill original estimate by 30m(or any data less than 1h), jira switch it by 0.5h. 

That's ok but the automation doesn't seem to understand as i wish because, the result is 0 and i expect 4.

This is my automation smart value

  • {{#=}} {{ issue.fields.timetracking.originalEstimateSeconds.divide(3600).mutiply(8) }}

It works with an original estimate greater than 1.

Can you help me please ?cap.pngcap2.png

1 answer

0 votes
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.
March 4, 2024

Hi @DS -- Welcome to the Atlassian Community!

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

Until we see those...

Have you included the units of measure when you set the field value?

Kind regards,
Bill

DS March 4, 2024

Thank you Bill and sorry for my mistakes. 

I have edited my post with images.

No i don't includ units, i set the field value to a "number field" from which its name is enough, i don't need it. 

i also see, jira return round values. 

for exemple, if originalEstimate = 1h2m, result expected is 8.48 but it's 8.

 

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.
March 4, 2024

I am using Jira Cloud, not Data Center, and so I wonder if there is a difference in behavior with the units of measure.

Where in your rule are you seeing the Original Estimate as I do not see that?

 

Also, your rule appears to edit a field and then write to the audit log.  When a rule runs, the actions are based on the issue values at the time the rule started.  It does not automatically update those in-memory values, even though you have updated the Jira database with the rule actions.

Please try adding a Re-fetch Issue action after your edit and before the write to the audit log:

https://confluence.atlassian.com/automation/jira-automation-actions-993924834.html#Jiraautomationactions-refetchissuedataRe-fetchissuedata

DS March 7, 2024

Thank you Bill.

I find another solution which works. 

On a confluence page, i add a "jira filter/issue" macro inside a "table transformer" macro. 

Then with an SQL query, i'm able to convert "original estimate" as integer and multiply it.

Than you for your time 

Best Regards

Jordan 

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer