Hello,
I'm trying to do a division between the remainingestimateSeconds value and a custom numerical value, but I can only get an integer division, without decimal points, which would not do for my objective.
With testing I see that remainingestimateSeconds is an integer number, however no matter what I try I can't get the automation to do a division with this number and still keep decimal points in the result.
Some of the things I tried are:
The last one just returns empty.
Are there any suggestions or articles about this? I can't seem to find anything.
It's obviously possible to do operations with remainingestimateSeconds, but they always result in integers.
Thank you in advance .
Hi @Luka Schnauzer -- Welcome to the Atlassian Community!
There are two formats of math expressions for smart values: inline and long form:
Inline expressions preserve the types in chained operations, such as remaining integers and truncating values. The documentation is incorrect in noting that floats are used when needed. Some customers have considered this behavior a "defect", and so there are some open "suggestions" to change the behavior.
{{issue.timetracking.remainingEstimateSeconds.divide(10)}}
Long form expressions appear to always use floats:
{{#=}}{{issue.timetracking.remainingEstimateSeconds}} / 10{{/}}
And the math functions for the long form may be used to manage the precision, such as with ROUND(): https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/#Functions
Kind regards,
Bill
Thank you, this solved the issue. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn it is working! Please consider marking this question as "answered" to help others with a similar need find solutions faster. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.