In Jira Cloud I have created a custom field (Select List single choice) and defined two values to choose from. However there is a 3rd value of None by default in my drop down menu. Given my two required values are Yes and No this 3rd value looks slightly odd. How can I remove it as an option.
Damien,
you can try
Hi Gaston, Thank you yes this worked but is it the only way to do this ? I may not always want this field to be mandatory.
Thanks
Damien
You can modify the template but I'm note sure if it's still working in the last version of jira, it's an old article:
https://confluence.atlassian.com/jirakb/how-to-remove-none-from-a-select-list-custom-field-144212308.html
I don't know any other way
No, the None text is there opposed to a select field with no text in the label.
The HTML difference between the two can be displayed between these two examples:
<select> <option value="-1">None</option> <option value="$optId1">$optName1</option> <option value="$optId2">$optName2</option></select>
<select> <option value="-1"></option> <option value="$optId1">$optName1</option> <option value="$optId2">$optName2</option></select>
Effectively, Atlassian for some reason decided that's how the select lists should look and it has stayed that way ever since. There's no configuration to change it.
As Gaston suggests, those running JIRA on their own servers may dig deep into JIRA's files to customize the template that renders the field but this option is not avaliable in JIRA Cloud: You can't just edit any arbitrary file.
The only way out-of-the-box (and thus in JIRA Cloud) is to mark the field as Required and with a Default Value.
Strictly speaking, making a field required is *NOT* the only way to do this in JIRA cloud. Better yet, you don't need someone else's add-on or to make a field required through the field configuration scheme.
The answer is checkboxes! Hear me out.
If you only need this to be required for certain transitions in certain projects, this is the easiest way to get that kind of flexibility:
* To get rid of the "None" option, use checkboxes instead of radio buttons or drop-down lists.
* Go into the project's workflow
* Open the "Validators" section of the transition you want this field to be required for
* Select the "Field Required" validator and apply it to your checkbox field
* Select the "Field has single value" validator and apply it to your checkbox field
Ta-da. If you need it to check for specifc values, just add the "Regular Expression Check" validator. Note: this validator looks scary because it mentions "Regular Expressions"- be aware that you can also simply have it check a value against a string/plaintext word/phrase.
Checkboxes may not be as sexy as a drop down list, but it gives you incredible flexibility that no add-on or "make this required in the field configuration scheme" solution will give you.
Not quite, and the solution is wrong too.
The reason it is wrong is that you've used the wrong type of field. A checkbox field is a a multi-select field with a different display.
You should have used a radio-button, as those are the same as single-selects. Of course, if you swap to a radio button, you'll now find it gets the "none" unless you set a default and make it mandatory.
A validator is a poor way to do this too, because you're not telling the user that the field is mandatory until after they've tried to commit. It also allows the user to empty the field out in edit mode. So it's clunky and ineffective most of the time.
Most of the time? Not in my experience. It's flexible and it allows for what the OP wants. Of course the user can empty the field on the edit screen- just like they could change the option in the drop down list or make a different selection with a radio button. And if that's a deal breaker, just hide the field from the edit screen but keep it available on the view/create screens.
I see the validator checking the field during the transition as a huge win- instead of just hiding a transition like an unsatisfied conditional does, the admin can make a custom error message shown to the user.
So yes, the solution works and it is exactly what the OP asked for.
No, please re-read what I said properly.
The OP wants a single select list. You've given them a multi-select.
We don't have the full requirement for where the field should be mandatory, and a validator *might* be right, but we don't know that.
So, the solution does not work and is not what the OP asked for.
Could someone supply me the solution to get rid of or rename the NONE option for a Single select dropdown? I found a very old post about modifing the edit-select.vm, I attempted it and it didn't seem to work. Any help would be greatly appreciated. I should add that Im using a host solution not cloud
And this is exactly the reason NOT to edit code. When a new release comes out you may have to rework all the code edits you have. Why does None bother your users so much? I've supported many users on multiple JIRA systems and they never had a problem understanding it.
I'll go a step further and point out that I've removed those hacks before because people don't get that an empty line means "none". I've never had any problem with users not understanding "none".
While I appreciate your opinions, my users are not able to distunguish "None" as a field that needs to be selected.. Heres an example, if I make a field required such as Data Center and in that drop down I have 3 options.
None
Americas
EMEAR
China
They think that None is a viable option to select within the field. I don't need to completly get rid of it but renaming it to something more intutive like " Please Select" or Select an Option" Something along those lines.
Is their a solution to this?
The idea that the application should insert an arbitrary value into your list is nuts if you don't supply a default. Doubly true if a response is required. If I have a single select for a color field with choices Red, Green, and Blue what should that default to? What color is 'None'?
It's not consistent and if this was a good solution then why aren't empty text boxes automatically filled in with the word 'None' if someone attempts to submit an empty text field that is required?
It's just another Atlassianism.
One work around for this problem that I've discovered with other fields is to add a post operation to your transition state for To Do.
E.g., if it makes sense to do so for the field you've created, simply add a post-operation for that field on To Do to set it to your default. Then whenever you create your ticket, the field is automatically set to the desired default option.
The side-effect is, of course, that if this field is not supposed to be changed when putting a ticket in To Do (continuing from the above example) from any other state, it will reset whatever status was already in the field to whatever you designated for the Post Function.
It's not a perfect hack, but can work well in certain situations where that's desirable behavior forwards and backwards (like clearing out Resolution automatically, so that you can require it for other transitions, set a desired fixed default in jira, and then tell people to just ignore it when creating tickets because it'll auto-transition back to Unresolved for them anyway.).
It looks like you're new here. Sign in or register to get started.