Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,415,112
Community Members
 
Community Events
170
Community Groups

How to display None on issue view

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

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.

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)

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.

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"

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.

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

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

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events