I have a Number Field PO Number, in which I can input a max 10 digit numeric value.
After creating the issue, when I see the number on View Screen it displays as below, for e.g.
Create Screen: PO Number: 1111111111
View Screen: PO Number: 1,111,111,111
Since this number is not an amount; how do I display it without the commas?
Kindly suggest.
If you want rid of numeric separators, you can do that by changing the look and feel so that they do not display in number fields.
Be aware that changing that affects all numeric fields, and makes them damn hard for humans to read. The suggested code change has the same effect, and also makes your server unsupported.
Thing is, here, your PO number is not a number, it is a string (that happens to be made up of digits). A far better option is to add a new short text field for it and remove the numeric version - this means actual numbers will continue to be shown in a readable form without affecting the simple string of digits that your PO "number" really is.
i want to get rid of numeric separators
could you please show me how do i get to this
Look and feel thing?
i don't want any numeric separators for all my fields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Pranita Warik - This is a known issue and you may need to update the config file
https://jira.atlassian.com/browse/JRASERVER-7582
If you don't want commas to be added, edit /WEB-INF/classes/templates/plugins/fields/view/view-number.vm. Replace the following line:
$!numberTool.format($value)
with:
$value.longValue()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I updated the file view-number.vm as below
#if ($customField.id == 'customfield_10900' && $value) //updated the id here
$value.longValue()
#elseif ($value)
$!numberTool.format($value)
But I do not see any change in the view screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Pranita Warik - Did you restart jira?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Even after restarting jira, the changes did not affect. Its still showing commas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online 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.