Format Number using Smart Values

Tim Martin June 12, 2019

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

2 answers

2 accepted

3 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.
June 25, 2020

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

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 26, 2020

Thanks, Bill!! Now I don't remember where I need to use the comma separator  LOL

Like Bill Sheboy likes this
3 votes
Answer accepted
Deleted user June 12, 2019

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

Tim Martin June 12, 2019

Nice - I missed the Round function. Thanks @[deleted] 

Doods Perea February 21, 2020

This worked for me as well @[deleted]

Would you know how to add a comma separator for thousand (10000 >> 1,000)?

Thanks!

Like Martin Cleaver likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2020

Hi @[deleted]  - I have a need for the thousand separator also. Or to show currency. 

Assia Touati June 11, 2020

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 

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events