Hello Everone,
I've made a single select custom field required. however, it is still showing the "None" option in the custom field. I've also performed re-indexing but the "None" still exists in the custom filed.
And I also tried to remove "None" option from the single select custom field by checking the below URL. However, None option still appears in the Custom fields.
Jira Version - 7.12.3
Lines in the edit-select.vm
#disable_html_escaping()
#customControlHeader ($action $customField.id $customField.name $fieldLayoutItem.required $displayParameters $auiparams)
<select class="select cf-select" name="$customField.id" id="$customField.id">
#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
#foreach ($option in $configs.options)
#if(!$option.disabled || $option.disabled == false || ($value && $value == $option.optionId.toString()))
<option#if ($value && $value == $option.optionId.toString()) selected="selected"#end value="$option.optionId">$cfValueEncoder.encodeForHtml($option.value)</option>
#end
#end
</select>
#customControlFooter ($action $customField.id $fieldLayoutItem.fieldDescription $displayParameters $auiparams)
Replaced it with the below lines:
<select class="select cf-select" name="$customField.id" id="$customField.id">
#end
#foreach ($option in $configs.options)
#if(!$option.disabled || $option.disabled == false || ($value && $value == $option.optionId.toString()))
<option#if ($value && $value == $option.optionId.toString()) selected="selected"#end value="$option.optionId">$cfValueEncoder.encodeForHtml($option.value)</option>
#end
</select>
Any help would be greatly upreciated.
Thanks,
Manikanta.
When you set a default Value for your customfield (in the "Configure Custom Field"-Menu) the "none" option will disapear...
In case you set a default value for a (single|multi|cascading) select field make sure to restrict the given to field to dedicated projects and/or issue types where the field definitely will be used.
Otherwise Jira will assume that you *could* use this field anywhere else across your instance hence this value will be stored in your database upon issue creation no matter what the project/issue type is and whether or not this field will be appear on the associated screen or not. And in case you're going to add this field on another screen the value is available. That's the logic behind.
As a result however you may - at least for larger instances - face performance issues since the index will increase unnecessarily as well as continuously. For a customer we had quite a large work to fix this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I came across this page since I have a similar problem (I cannot make the "None" option invisible/unavailable during a workflow transition even though the field is mandatory during the transition). It is pretty obvious that I have to make a field fully mandatory, not only during a transition. But I can populate this field only during the workflow, not at the beginning (create issue).
Furthermore, I was advised to use "Deviniti Dynamic Forms" to make the "None" option unavailable. However it only works with a side effect when it comes to another plugin used for the same transition (Extension for Service Desk). Most of the issues within a JSD project will be triggered by mail, hence users will have to set request type manually. As the users are not really experienced with Jira and may overlook to set the request type without being prompted during a transition, they should be able to set request type during the very first transition once the issue is created. Based on the selected request type other issues will be created automatically.
However, the side effect is that any selected request type will be set during transition but not be displayed on transition screen once chosen, which is quite confusing. Once I disable Dynamic Forms everything is fine. But preferably I can use both plugins for their respective purpose.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is odd.
Can you check the options of the field to confirm that None is not an option.
Also check and ensure you made it required in the correct field configuration.
As for modifying the .vm file, I don’t know if a restart is required but I will say give it a shot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From my experience a restart is required. We had done this earlier to change the contents of email notifications (which are also *.vm files).
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.