Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-7687

Remove 'None' option if select list is required and has a default selected

    • 16
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      Atlassian Status as of 2 January 2013

      Hi everyone,

      Thanks so much for your votes and comments on this issue.

      This issue has been resolved in our latest bug fix release for JIRA, JIRA 5.2.4. The 'None' option no longer appears when the select list is a required field and has a default value.

      Thanks for your patience and we hope you appreciate our open approach to feature requests.

      Cheers,

      Bryan
      JIRA Product Management
      brollins at atlassian dot com


      Original Description:
      Due to fix implemented for JRA-3666 the 'None' option was added even when the field is required.
      This makes sure that the user is forced to make a choice for the value instead of defaulting to the top of the list.

      However if you have set a default value the 'None' option becomes irrelevant so should be removed.

          Form Name

            [JRASERVER-7687] Remove 'None' option if select list is required and has a default selected

            I use cloud version and I see None option even after setting a selection list (cascading type) as required & default value to one of the specified value.  

            Sudheer Revuru added a comment - I use cloud version and I see None option even after setting a selection list (cascading type) as required & default value to one of the specified value.  

            This is not a solution.

             

            The whole point of a required field is forcing the user to fill in a value and not just leave it with the default NULL. By creating a custom option (called "Please select.." for example) and setting it as default, the user still can ignrore those "required" fields and create the issue without touching them, making the "required" state meaningless.

             

            I need to force users to actually fill the field with a value that is not NULL, and I need the option to rename the default NULL state to something other than "none". 

             

            To quote Jeremy Clarkson: How hard can it be?

            Martin Hilbig [team neusta] added a comment - This is not a solution.   The whole point of a required field is forcing the user to fill in a value and not just leave it with the default NULL. By creating a custom option (called "Please select.." for example) and setting it as default, the user still can ignrore those "required" fields and create the issue without touching them, making the "required" state meaningless.   I need to force users to actually fill the field with a value that is not NULL, and I need the option to rename the default NULL state to something other than "none".    To quote Jeremy Clarkson: How hard can it be?

            @Mao Lee: You probably didn't set a default value. In this case "None" still appears, since it's Jira's "default" default value for custom fields. Change it to one of the values you specified and you should be good.

            microtech IT added a comment - @Mao Lee: You probably didn't set a default value. In this case "None" still appears, since it's Jira's "default" default value for custom fields. Change it to one of the values you specified and you should be good.

            Mao Lee added a comment -

            I'm still seeing 'none' as an option in the drop down even though I set the field to "Required" and set the default fields

            Mao Lee added a comment - I'm still seeing 'none' as an option in the drop down even though I set the field to "Required" and set the default fields

            Workaround for this issue:

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

            Delete the following lines in edit.select.vm class file:
            ...
            #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>
            ...

            Paranthaman Natesan added a comment - Workaround for this issue: To remove the field, edit atlassian-jira/WEB-INF/classes/templates/plugins/fields/edit/edit-select.vm. Delete the following lines in edit.select.vm class file: ... #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> ...

            Jay Kantaria added a comment - - edited

            This does not work for cascading select field.  When I select parent ... child field is still has "NONE"

             

            Jay Kantaria added a comment - - edited This does not work for cascading select field.  When I select parent ... child field is still has "NONE"  

            Still not fixed for cloud despite the corresponding suggestion saying it has been ... 

            Tim Coleman added a comment - Still not fixed for cloud despite the corresponding suggestion saying it has been ... 

            Same issue here. Can we please get rid of the 'None' option for Cloud?

            Safinaaz Bhoelan added a comment - Same issue here. Can we please get rid of the 'None' option for Cloud?

            I have the same issue - I have required fields (done through fields configuration) and I still see NONE option. System doesn't allow you to continue with 'none' but this is quire annoyiung

            Petra Maťková added a comment - I have the same issue - I have required fields (done through fields configuration) and I still see NONE option. System doesn't allow you to continue with 'none' but this is quire annoyiung

            This should be re-opened. "None" is no longer removable, even if making it a required field and adding a default value. I'm now having to create additional validators to make sure my users aren't submitting "None" in my required field. v7.7.1

            Andrew Padilla added a comment - This should be re-opened. "None" is no longer removable, even if making it a required field and adding a default value. I'm now having to create additional validators to make sure my users aren't submitting "None" in my required field. v7.7.1

              edalgliesh Eric Dalgliesh
              brian@atlassian.com BrianH
              Votes:
              182 Vote for this issue
              Watchers:
              134 Start watching this issue

                Created:
                Updated:
                Resolved: