Hopefully this is an easy one...
I've got an Automation rule that sends an email with a few customfield values. Only problem is it outputs numbers like:
Units: 167.0
Where my users would like to see this displayed as:
Units: 167
I tried using some text functions, like {{issue.customfield_12345.remove(".0")}}, but can't get it to work. Is there an easy way to format the number or treat it like text?
Cheers,
Tim
Hi Tim,
You can use our MATH functions to perform operations on custom number fields in Jira. In your example you should be able to remove the decimal place by using the ROUND function with 0 precision i.e.
{{#=}}ROUND({{issue.customfield_12345}}, 0){{/}}
You can find more information in the docs here: https://docs.automationforjira.com/working-with-issue-data/math-functions.html#reference.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me as well @[deleted]
Would you know how to add a comma separator for thousand (10000 >> 1,000)?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is there a function who make the oppsite of "round" ? i want to show the decimals in my custom field when i do the addition
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Greetings, all!
It appears the number formatting was recently added: https://codebarrel.atlassian.net/browse/AUT-1591
Here is an example with for very large story point estimates :^)
{{issue.story points.format("###,###,###")}}
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.