Remove Commas for Values held in Number Field Custom Field Type
The information on this page relates to customizations in JIRA Applications. Consequently, Atlassian Support cannot guarantee the provision of any support for the steps described on this page as customizations are not covered under Atlassian Support Offerings. Please be aware that this material is provided for your information only and that you use it at your own risk.
Also, please be aware that customizations done by directly modifying files are not included in the upgrade process. These modifications will need to be reapplied manually on the upgraded instance.
If you don't want commas to be added, edit
/WEB-INF/classes/templates/plugins/fields/view/view-number.vm. Replace the following line:
Make sure to back up the Velocity file before changing it.
Disable commas for a single customfield
It's possible that you would like to disable the commas for a single custom field instead of multiple custom fields in this case, we can add the customField.id value to filter for this custom field specifically.
This will require you to identify the customfield ID by inspecting the URL while editing the custom field. For example, if customfield "Phone Number" has the ID 10900 the value would look like:
#if ($customField.id == 'customfield_10900' && $value) $value.longValue() #elseif ($value) $!numberTool.format($value)
It's possible add multiple custom fields by adding multiple elseif statements.
Deploying Velocity Templates without a Restart
In a development instance, you can configure JIRA to pick up velocity file changes without a restart.
- Change class.resource.loader.cache from
Uncomment (remove the # sign from)