Radio Buttons custom field , field option

I would like to use a Radio Buttons custom field from the list of available custom fields in Jira 6.0(and later).

However the trouble is I would only like a "yes" and "no" option but Jira seems to have a "None" option for this custom field that I cant seem to remove . I've tried going to the Edit and Configure option for the custom field but it still seems to be there in the screen.

How can I only have a "yes" and "no" option (the options for the custom field only says "yes" and "no" after I added them , but the screen I am using it in shows a "none" radio button for this custom field as well). Even when selecting the "default value" I can see the "none" radio button is still there.

Any help would be appreciated.

Thankyou

3 answers

1 accepted

1 vote
Accepted answer

make this field mandatory on field configuration and set default value for this field then it will remove the none option.

another way, you need to edit custom field templets, check the following document

https://confluence.atlassian.com/pages/viewpage.action?pageId=330795312

Thanks rambanam

I wish there was a better way to remove the "None" option than modifying the .vm file.

The making it a mandatory field does work however ideally I would not like to be forced to make the field mandatory as a work around for this problem.

Is there any other way as well?

Thanks

another way is you can hide/remove the none option by using Javascript!!

Yes certainly. Though it would'nt feel right :D

Thanks for your valuable input rambanam. Appreciate it.

i don't know other than above options :(

"None" means "the users haven't answered this question", so it's not actually a good idea to remove it when the field is optional - people tend to make mistakes when they are not given direct answers to questions.

Nic, I will be naming my field "Create Perforce Job", so it will only have a radio button option of "Yes" and another which says "No".

By default it would be set to "Yes", so in this case having a "None" option doesnt make sense.

If the user doesnt answer it , the default option is selected anyway , so an answer is provided on behalf of the user .

Also since you mentioned it , how could i change the text of the "None" option that the custom field provides to "not answered"? (Rather than adding a new "not answered" option and keeping the "None" option as is).

Ok, but that really does mean you want it mandatory, because you want the users to put something in, no matter what. Let me put it this way.

Is "not answered" a useful response to the question "Do you want to create a Perforce Job?".

  • If it is not a valid response, then you should to make the field mandatory in order to force a valid response.
  • If it is a valid response, then you need "None" to represent it. Or you need to add a third option of "I don't know" and make the field mandatory

Always think about what you're trying to get out of a field and "what answers do we need from this" when you're defining them, it really does help you come up with the best use of the field.

That's the same as making it mandatory and defaulting an option. Which you need to do to prevent the user from selecting "I don't know" (as "none"). My point wasn't about defaulting it or handling it for the user, my point is that if "none" is not a valid response, then you should be making the question mandatory. Even if you then default it, the point is you don't want to let the user enter an invalid non-answer. It's about thinking through the question you really want them to answer.

Anyway, yes, you can rename "none", with a bit of work - if you change the common words used in Jira, then changing the values for "common.words.none" will change the word in the options. See https://developer.atlassian.com/display/JIRADEV/Customizing+Text

Thanks for your answer Nic. Actually that would change all instances of "None", which I might not want. So Im assuming for that specific radio boxes field I cant change "None". Right?

Well, to do it on a field level, you'd probably want to hack the .vm for the field instead.

It'll have a line in it like "option name="common.words.none"", which you could tweak to say "if field = myfield then option name="something", else option name="common.words.none"" (Apologies for the awful pseudocode)

Yes Rambanam above introduced the idea of changing the .vm file for the radio buttons (though that was to remove the "None" option from all radio buttons which is not the best possible solution to remove "None" from just a particular custom field like in my case.

Your solution seems to be interesting though. Thanks!

@Nicif you can provide your above comment as an answer and let me know I would like to mark it as correct.

Thanks

Using the In-TENSO Dynamic Forms plugin, I can remove None in their Dynamic Radio Buttons field (and presumably others) by clicking Edit Empty Value Switcher to turn it to OFF. This is a paid plugin, however.

I agree with you that the None option is a problem for many of the ways we use fields. We would prefer to be able to turn it on and off in the configuration like we can with Dynamic Forms fields.

I wish there was a better way to remove the "None" option than modifying the .vm file.

The making it a mandatory field does work however ideally I would not like to be forced to make the field mandatory as a work around for this problem.

Is there any other way as well?

Thanks

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Jira

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,081 views 0 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you