How to display None on issue view

Robert Leachman May 13, 2021

I found something today, seems amazing genius and I wonder if others here will agree. There aren't many people on this planet that will appreciate this...

I just noticed someone -- long gone from the company now -- had added a snippet to our Announcement Banner:

#customfield_11402 option:nth-child(1), #customfield_11903 option:nth-child(1), #customfield_10410 option:nth-child(1), #customfield_11905 option:nth-child(1) {
display:none;
}

Looking further, these are single-line select lists and not required on any screens. This hack hides None/null, you know, the value that's offered if the field isn't required. In my short time as Jira admin I've had to explain more than once to my users that if we don't want None/null as a valid option then the field must be required. Right? But this is rather elegant! No weird red required asterisk where it doesn't seem to belong!

OK here's the crazy part: along with the other choices, the first in the list of values for these is... "None". For these fields the word "None" is an actual choice and not null. The users are effectively required to pick a value, or skip over it and leave it set it to None.

The impact? Even when "None" is the choice the field will be displayed on the view screen!

tl;dr: a simple CSS hack can trick Jira into displaying a value that should mean "null/no value"

1 comment

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 13, 2021

You do know this breaks your searching?  "<field> is empty" will give the wrong answer because the fields are not empty when you force "none" into them.

Robert Leachman May 13, 2021

Agreed! Empty, they shall never be. But it seems to search OK

  • field != "None"
  • field = "None"

These return what I would expect (once I got my mind around what had been done here)

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 13, 2021

But your searches are still wrong.  This is not a good thing to do to your people.

You really should remove this.   It's exactly the sort of thing I spend so much time removing from broken Jira systems.

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 13, 2021

And "field = 'None'" is wrong as well, because it's not true.  You're actually asking "field is something but is showing none", and that's broken.

And when you say "how many issues have a value in that field",  the answer is technically correct, but wrong as far as your humans are concerned.

You really need to get rid of this broken "trick"

Robert Leachman May 13, 2021

I hear you Nic and I hope my tone wasn't "we should all do something like this"... I meant to be more, "who knew this crazy could work".

The worst part for me is we nothing to refer to for when/why it was implemented. I never touch the announcement banner without including <!-- see TIX-123 --> or something. Will be an uphill battle to revisit now.

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 13, 2021

It worried me that you thought it was "genius" to put in such a terribly broken botch like this!

Robert Leachman May 13, 2021

Yeah I did say that didn't I... more like, technically brilliant if short sighted :)

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events