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

How to configure JIRA to show more digits for the custom field type: Number Field

David Chan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 21, 2011

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:

  • Create an issue and enter this into the number field: 3.14159265
  • JIRA's interface will then display: 3.142
  • The database will still store the full value as 3.14159265

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

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Jeremy Largman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 21, 2011

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.

1 vote
Philip Hur January 10, 2012

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.

Jeremy Largman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 10, 2012

I think you might want to edit your question here, or repost it as a new question with more specifics.

0 votes
QDappnet April 12, 2018

@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.

Lee Burton (SmokinMedia.com) August 21, 2018

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.

0 votes
MattS
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.
December 22, 2011

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?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events