Custom field types such as select list (single and multi) come with the None option, and the only way to remove that is to make the field required. While this makes sense, it can be cumbersome to chase down every field and configuration.
In this recipe, we will remove the None option from all single select list custom fields.
Since we will be modifying physical files in JIRA, you will want to make backups of the files we change.
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/plugins/fields
directory, and the edit view templates are in the edit
subdirectory.
So we need to open the edit-select.vm
file in a text editor and remove the following code snippet:
#if (!$fieldLayoutItem || $fieldLayoutItem.required == false) <option value="-1">$i18n.getText("common.words.none")</option> ...