Radio Buttons custom field , field option

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

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
Answer accepted
RambanamP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

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

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

Thanks rambanam

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

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

RambanamP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

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

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

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

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

Thanks for your valuable input rambanam. Appreciate it.

RambanamP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

i don't know other than above options :(

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 2, 2014

"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.

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

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.

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

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).

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 2, 2014

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 2, 2014

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

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

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?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 2, 2014

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)

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

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!

Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 11, 2014

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

Thanks

1 vote
Jane Brooks March 19, 2018

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.

0 votes
Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2014

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