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.

        1. custom field options does not show.jpg
          83 kB
          Ann Myers
        2. ticket screen.jpg
          124 kB
          Ann Myers

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

            Agata Kowal made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 722438 ]
            Agata Kowal made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 722437 ]

            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.  
            Katherine Yabut made changes -
            Workflow Original: JAC Suggestion Workflow [ 3062484 ] New: JAC Suggestion Workflow 3 [ 3693948 ]
            Status Original: RESOLVED [ 5 ] New: Closed [ 6 ]

            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"  
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing v4 [ 2600082 ] New: JAC Suggestion Workflow [ 3062484 ]

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

                Created:
                Updated:
                Resolved: