Typical three-valued (null/false/true) DB field in JIRA?

Guenter Huber
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 15, 2012

I m giving the IT-guys the fits here with the wish for a custom field - vanilla three-valued (null/false/true) DB field.

"None" seems somehow to be synonymous with Null I m told and carved in stone, but "None/False/True" or "None/No/Yes" doesn t make sense, while "Null" or "Unknown" for the first default value would be perfect.

Thx
G.

Edit:
PS: Just got a 504 from the Answers site and pressed Reload. Guess that s why the topic appears twice!!!

2 answers

1 accepted

0 votes
Answer accepted
Guenter Huber
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.
October 9, 2012

There is no really good solution.

We took a text field. If it s empty I need to check. If it s Yes, action is needed, else No...

0 votes
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.
May 15, 2012

Well, the true/false bit is a doddle in a select list, but I can see the ugliness with "null"

Jira always offers "none" in a select list, but it's not a null, it's a fourth state. For the users it really means "I choose not to enter the data", and in the database, it means "don't even create a record for this". Which is not even "null", it's "nothing there at all". Of course, the code doesn't like "null" in the database, so you never end up with a record and a null.

I think what you really want to do is

1. Add a field as usual, with Null, True and False

2. Supress Jira offering "none" to the users

That will give you a field which is always set to null, true or false, no matter what. Unfortunately, you'll need to do a bit of tweaking to do this - have a quick search here for "Jira" and "none" and "Select" and you'll see you're not alone.

Another option might be to hack the language and replace "none" with "null", but that'll make the other fields look odd...

Guenter Huber
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 15, 2012

Veeery quick followup b4 I leave for the long weekend:

Change None no option - too dangerous to change company-wide semantics.

Any other way to suppress None?

Any other custom field type like Label e.g. that allows the three desired values

Thx a ton
G.

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.
May 15, 2012

Yes, I thought the change of none to null was probably a dead-duck, but I thought it was worth mentioning. It's worked for one of my clients (albeit not "null", but the language they needed was generic enough to make it look ok)

There's the hacks I mentioned searching for before - they aren't too huge, but do need a bit of understanding and a restart of Jira.

A third option might be a spot of javascript, which you can embed on the screen. You can use it to remove the "none" option, assuming you've added null/true/false as the three options. Not pretty, but doesn't require hefty coding. I think the behaviours plugin can do this for you too.

Suggest an answer

Log in or Sign up to answer