- Jira 8 Administration Cookbook(Third Edition)
- Patrick Li
- 119字
- 2025-04-04 14:09:59
How to do it...
Jira uses Velocity templates to render custom fields. These templates are mostly HTML, with some special symbols. You can find all these files in the JIRA_INSTALL/atlassian-jira/WEB-INF/classes/templates/plugins/fields directory, and the edit view templates are in the edit subdirectory:
- Open the edit-select.vm file (located in the previously mentioned directory) in a text editor, and remove the following code snippet:
#if (!$fieldLayoutItem || $fieldLayoutItem.required == false) <option value="-1"> $i18n.getText("common.words.none")
</option> #else #if ( !$configs.default ) <option value=""> $i18n.getText("common.words.none")
</option> #end #end
- Save the file and restart Jira. Make sure you do not change any other lines.
You can remove the None option from other custom field types, such as multi-select, by editing the appropriate file (for example, edit-multiselect.vm).