I have this math equation and it is working great, except that I am getting back a 2 decimal place and I only want the whole number
{{#=} {{varDoneCount.asNumber}}/{{varTotalCountSmart.asNumber}}* 100 {{/}}
I am not sure where and how to add the floor option as the documentation I read have it as a .Floor and that does not appear to work
I have been referencing:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
but there is no example when you have the * 100 result that you want to eliminate the decimals
Would I need to do another calc where I take the field value returned from this, then apply the .floor to that?
There are two formats for many of the math functions: inline and long-format.
The inline ones can produce unexpected results because the chaining usually preserves the first value's typing, leading to integer division, etc.
For your scenario, I recommend using the long-format of FLOOR(), and as a side benefit the conversion of the variables to numbers is automagic:
{{#=}} FLOOR( {{varDoneCount}} / {{varTotalCountSmart}} * 100 ) {{/}}
If that does not help, please post images of your complete rule, the action where that expression is used, and the audit log details for more context.
Kind regards,
Bill
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.
it seems to be working, I will keep an eye on it.
THANK YOU
Bonnie
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.