JIRA 5.1 : How to Remove 'NONE' from a Select List Custom Field

There are some instances where the 'NONE' in every select list needs to be removed. By default in JIRA you cannot do this from the web interface. See JRA-7687 for a discussion on this feature request.

The page _Velocity_Template_Customisation does not exist.

This workaround will apply to all Select List Custom fields in the instance.

To remove the field, edit <atlassian-jira/WEB-INF/classes/templates/plugins/fields/edit/edit-select.vm. Delete the lines:

...
  #if (!$fieldLayoutItem || $fieldLayoutItem.required == false
    <option value="-1">$i18n.getText("common.words.none")</option>
  #else
    <option value="">$i18n.getText("common.words.none")</option>
  #end
...

The following code should remain:

...
<select name="$customField.id" id="$customField.id">  #foreach ($option in $configs.options)
    <option value="$textutils.htmlEncode($option.value)"
  #if ($value && $value == $option.value)selected#end
    >$option.value</option>
  #end
</select>
...

Make sure to back up the velocity file before changing it. Keep in mind the notes from Modifying JIRA Templates and JSPs​.

RELATED PAGES
No content found for label(s) jira-custom-velocity.