Is there a way to create a boolean custom field?

Tai Thach July 23, 2012

Is there a way to create a boolean custom field?

2 answers

5 votes
Jobin Kuruvilla [Adaptavist]
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.
July 23, 2012

Look at checkboxes. It is pretty much like boolean!

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.
July 24, 2012

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.

Like Vander likes this
Thomas Wendel
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.
November 13, 2012

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

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.
November 13, 2012

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.

Thomas Wendel
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.
November 13, 2012

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 :-(

0 votes
Tanner Wortham
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.
July 23, 2012

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

Naren
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.
November 13, 2012

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

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.
November 13, 2012

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