An issue was brought up to Atlassian Support to increase the digits shown with JIRA for the Number Field. We have helped create a corresponding an improvement ticket, found here:
https://jira.atlassian.com/browse/JRA-26639
Here's the basic problem:
The Number Field seems to have a limit to only display 3 decimal places. For example:
With that, we know this is strictly a display problem with JIRA's interface. We can edit the view-number.vm template and this works fine when you view an issue. The problem, however, is that when you then try to 'Edit' and 'Update' the same issue, you 'll see that it reverts back to 3.142.
So this is a bit out of scope for support and needs some developer type feedback. I'm hoping that we can get some quicker feedback from the community.
tl;dr How do you customise JIRA to show more than 3 decimal places in the Number Field
Community moderators have prevented the ability to post new answers.
There are usually .vm files that correspond to the different issue operations. I suspect you're just not mapping the change to enough files.
view-number.vm is in If you look in /atlassian-jira/WEB-INF/classes/templates/plugins/fields/view. Go a couple directories up and you'll see the corresponding edit templates.
Hopefully this edit will clarify the issue. Jeremy, as you mentioned before, there's a corresponding template that will allow us to display the additional 6 digits when clicking on edit for the issue for that custom field. This is what I am trying to resolve. Here is the block of code in my edit-number.vm located in atlassian-jira/WEB-INF/classes/templates/plugins/fields/edit:
#customControlHeader ($action $customField.id $customField.name $fieldLayoutItem.required $displayParameters $auiparams) <input class="text long-field" id="$customField.id" name="$customField.id" type="text" value="$textutils.htmlEncode($!value)" /> #customControlFooter ($action $customField.id $fieldLayoutItem.fieldDescription $displayParameters $auiparams)
I'm new to Jiira and frankly I'm not all that familiar with Java. Can someone please assist me in determining how the variables are defined: ie what is $customField.id or $textutils.htmlEncode? Also, what is to the left of the variables..ie input class? The end result would be to display the 6 digits for the custom field as opposed to the 3 digits.
Thanks in advance for the help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you might want to edit your question here, or repost it as a new question with more specifics.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David Chan I know this is a very old question, but after 6 years+ JIRA haven't fixed this issue yet. It still defaults to 3 decimal places and rounds up anything after that. I don't want to put number data in text field, so I am still looking for a way to edit and display more than 3 decimal places in JIRA number custom field.
Did you find a good solution for this? I updated the view-number.vm template and it works, but I couldn't make the edit work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are having the same problem on cloud version. This is extremely frustrating. And if we place numbers in string fields, we cannot perform comparisons with ">" and "<".
Supposedly, it was fixed:
https://jira.atlassian.com/browse/JRASERVER-16883
but it clearly has not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There's a section in Practical JIRA Plugins (O'Reilly, 2011) that talks about extending the Number custom field type for different currencies. You'll find info in there about how the value is rendered using the NumberTool class
I think there may be a copy near Ken O's desk?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.