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,559,058
Community Members
 
Community Events
184
Community Groups

jira filter != doesn't find empty values

Robert Nadon
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.
Jan 25, 2016

Hi all,

When I create a filter where field != value, the results do not show field = EMPTY issues.

A workaround is to do (field != value OR field = EMPTY) but I was told that this was not the way it used to be so I was wondering if there is a setting for that.

Thanks!

Robert

 

3 answers

1 accepted

2 votes
Answer accepted
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.
Jan 25, 2016

No, it hasn't changed. 

"Does not equal" is not quite the same as "empty" because != says you're looking for a specific value to not be there.  If there's no values to look for, you can't say that your selection isn't there because there's nothing to look for.

Well, not since JIRA 3, which didn't have JQL, so you didn't have != or empty.

Robert Nadon
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.
Jan 25, 2016

Thanks, that was what I thought.  I will tell them to use the workaround I listed above.

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.
Jan 25, 2016

It's a little bit confusing for humans, because of our fuzzy thinking.  Even a "yes or no" question really has three "answers" - yes, no, and not answered.

My friend explained it by saying "show me a picture of your black cat", then "show me a picture of all your cats who are not black", then "show me a picture of your dog who is not black".  I don't have a dog, so I have to look for "empty" rather than "not black", because there's no dog there to not be black.  (I love English negatives.  Not)

Like Olena Vasylevska likes this
Robert Nadon
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.
Jan 26, 2016

Dang humans.  Makes perfect sense to me, but my customer is still not happy.  His concern is that in the future he will forget to use the "OR field = EMPTY" and miss records in his reports.   I told him I could change the field to required and create a dummy value (called it "no value") and set that as default.  Then go through with bulk change and find all issues with EMPTY values and change them to "no value", but I really do not like that solution as it adds even more clutter in my instance.   Any thoughts on that solution?

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.
Jan 26, 2016

Yeah, I know, we need to think more logically wink

I think your cluttered solution is about the only option you have without coding.  Or just beating "empty != != " into him.  The problem is that there are genuine uses for having them work differently!

Does this work around actually work. The Or function returns the values as if they were a separate query? So you end up with the results you excluded by using != in the = EMPTY results ie. 

Pet type 

  • Cat 
  • Dog 
  • EMPTY 

(Pet Type != dog OR field = EMPTY)

Which translates to. Show me everything that is not a dog, and show me everything (including dog) that is not empty

This returns 

Dog, Empty, Cat 

Not the expected

Empty, Cat

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.
Feb 22, 2021

Yes, using the right JQL does "work".  There's an important thing to understand here - JQL is not SQL and it has nothing to say about the results are returned.  When you "run" some JQL, all that the calling process gets back is a list of issues that matched the query.  

Also, empty really does mean empty - there is nothing there in the database for an empty field, nothing at all.  So in fact you can't say:

Pet type 

  • Cat 
  • Dog 
  • EMPTY 

Because all you have is

Pet type 

  • Cat 
  • Dog 

(And that's why != does not return the results, it's got nothing to compare with at all)

Your query translation is not quite right by the way

You said:  "Pet type != dog or field is empty", which means "Show me all issues with a Pet type where it is not dog, and all issues that do not have a value in "field"".  I'm guessing the issues being returned that have "Dog" on them have nothing in "field"

I think you might mean "Pet type != dog or Pet type is empty", which would give you issues with no Pet type and issues with Cat

Hi

I'm facing the same issue. I need all results that are not 'Dog' , but i want to include all 'None'/Empty results as well.
Can someone help me with the syntax?

labels != Dog OR labels = None
Doesn't do the trick and adding brackets doesn't help either.

Robert G. Nadon
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 30, 2019

labels != Dog OR labels is EMPTY

is the correct syntax.  There is no "None"

Like # people like this

Thanks for the syntax help everyone! This worked for me:

status not in (Done, Rejected) AND 'Customer(S) Reporting' is EMPTY

Hello Everyone - thanks for the syntax references. This worked for me:

status not in (Done, Rejected) AND 'Customer(S) Reporting' is EMPTY

One would think the != Dog would bring back every value, including a non-value as that is not Dog.  To exclude empty you should have to state != Dog and is not EMPTY.  That's the logical solution to any query!!!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events