The problem of displaying numbers higher than 6 digits in the automatic comment

Taha Tabatabaei August 12, 2023

Hi,
In one of our projects, we have numeric fields that may take a value between 7 to 10 digits.
This number is displayed correctly in the screen view, but when we automatically comment this number on the issue with the post function at one stage, the number is in scientific notation.
How to solve this problem?

 

view screen.JPG

Comment.JPG

 

1 answer

1 accepted

2 votes
Answer accepted
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 12, 2023

Hi @Taha Tabatabaei  Welcome to Atlassian Community!

Kindly updated your smart value to : {{issue.FieldName.format}}

Format numerical values

format

Formats a number in US locale. For example, 123412345 becomes 123,412,345.

1 {{issue.Invoice Amount.format}}

format(input)

Formats a number in the given locale. 

 {{issue.Invoice Amount.format("###")}}
Taha Tabatabaei August 12, 2023

Thanks! @Vikrant Yadav 

Its working.

can you tell me equivalent code in groovy for this issue?

Like Vikrant Yadav likes this
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 12, 2023

You're Welcome! @Taha Tabatabaei 

I have never used groovy or scriptrunner of jira cloud. I am not sure how it works in jira cloud. You can try this : .toInteger()

In Jira Server/Data Center groovy code I can help. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events