Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Format Number using Smart Values

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

1 vote
Answer accepted

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 Jun 26, 2020

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

Like Bill Sheboy likes this
0 votes
Answer accepted

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

Nice - I missed the Round function. Thanks @Yvan Martin 

This worked for me as well @Yvan Martin

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

Thanks!

Like Martin Cleaver likes this
John Funk Community Leader May 12, 2020

Hi @Yvan Martin  - I have a need for the thousand separator also. Or to show currency. 

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 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

209 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you