Hi guys,
So I have a number field and I want to remove the decimal value since this field will only be whole values. How do I do that? When the field is merged into an email that is sent it will display 2.0 instead of 2 that I entered.
Now I read this page
https://community.atlassian.com/t5/Jira-questions/Remove-decimal-points-when-adding-Number-Field-to-summary/qaq-p/229142
And I found this
issue.summary = issue.summary.replaceAll("\\.0")
But I have no idea where to input this or if this is the best solution? I am a newbie learning Jira so detailed instruction on how to solve this would be appreciated.
That bit of code there only works if you have Script Runner.
You could use a regular expression workflow validator, but that would not help you for when users use the Edit screen or inline editing.
A regular expression to match only integers could be as follows:
^[0-9]*$
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @josh appreciate your reply.
But can I use your answer? Because if edited it will not work or what?
Does following mean that highest value is 9? Or it just removes the decimal?
^[0-9]*$
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.
Register nowOnline 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.