Is there a way to create a boolean custom field?

Is there a way to create a boolean custom field?

2 answers

5 votes

Look at checkboxes. It is pretty much like boolean!

Exactly what I do - a multi-check box field with a single option will behave precisely as a boolean.

You can be more explicit with a radiobutton with 2 options, but that isn't quite as pretty.

I stumbled over this question because I was looking for a boolean field as well.

From my point of view a simple multi-checkbox with only one option is not good enough. While a multi-checkbox with a single option is pretty much boolean, it only shows up when the checkbox is checked. Unless there is a way to make JIRA display empty fields as well, this is not an option in my case.

I tried the approach with radio-buttons or a select-list, both with the options "yes" and "no". However, in both cases I can not get rid of the "none" option, which makes this approach not boolean anymore. And like the multi-checkbox, having just "yes" and "none" is not cutting it either, because "none" is, again, not shown at all.

So, does anybody have another idea?

Cheers,

Thomas

Yes, but you'll need code. I think it's as simple as extending a standard custom field that always stores "true" or "false" and never a null, then making the .vm to display/edit it pretty.

Nic, I agree. It would not be a difficult task to implement a plugin with a new custom field which is truly boolean. The only problem is that our cusotmer is on a tight budget which won't allow the development of even such a simple plugin :-(

I know of no way to create a boolean custom field, but maybe a plugin like this providing booleans in workflow transitions might solve whatever your problem might be:

https://marketplace.atlassian.com/plugins/com.tng.jira.plugins.workflowenhancer/version/7

Hi Thomas, you can get rid of the 'None' value from the Select List and Radio button customfields and making fully boolean, please go through this link -

https://confluence.atlassian.com/display/JIRA/How+to+Remove+%27NONE%27+from+a+Select+List+Custom+Field

I don't think that does it because the "none" display is stored as "there is no data here" in the database.

When the field is displayed on-screen, then it doesn't show as "none" or whatever you change that to, the whole field is skipped completely.

In other words, if you have a field set up as boolean values, you say

"True" = True (this will work fine)

"False" = none/empty (and will not be displayed)

An issue with "true" set will show "true". An issue with "false" set, won't even display the field name, you'll get nothing on-screen at all.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

135 views 5 9
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