Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

!= to exclude values also excludes the empty value

Cosmin Moldoveanu August 25, 2020

I am trying to create a JQL that excludes a value for a field, but I want the empty value as well for the same very field, how can I do this beside
(field != value or field = empty)

And why does it automatically exclude the empty values when I exclude only one value?

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
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.
August 25, 2020

Hi @Cosmin Moldoveanu   -- Welcome to the Atlassian Community!

Please consider trying IS EMPTY rather than = EMPTY?

Also, JQL is not really a SQL, ISO compliant variant.  It has some common syntax elements but not all of them.

Best regards,

Bill

Cosmin Moldoveanu August 25, 2020

Hi Bill, thanks for your answer and time. 

It is indeed working your way as well, no difference in the bug count when I try both = or IS.

I am still looking forward to understand why is this happening if someone can explain it.

Thanks in advance!

Bill Sheboy
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.
August 25, 2020

Thanks for that info... Some fields behave differently with different JQL syntax.  If you post your full JQL statement, perhaps that will help the community offer ideas.

__Bill

Like Cosmin Moldoveanu likes this
Cosmin Moldoveanu August 25, 2020

What I was trying to look for initially was
labels not in (value1,value2)
and it would automatically exclude the tickets that were empty on this field, this is mainly my question, trying to understand why would it exclude the empty tickets when I excluded only two user input values.

Nic Brough -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.
August 25, 2020

It's a logical thing that where humans are mostly woolly thinkers because our easy assumption works fine most of the time.

TLDR: you can't report on what isn't there.

We conflate "nothing there" with "does not have a value", and that works most of the time.  Think of the simple question "is that unicorn pink"?  It makes sense when your computer says "no", but when you reverse it, humans struggle because the answer to "is the unicorn not pink?", which has to work out to be the opposite of "is it pink?"

In purely boolean terms, the answer to the question is always yes.  And when you stick a boolean through a "not", you get the opposite out.

Like Cosmin Moldoveanu likes this
Cosmin Moldoveanu August 25, 2020

Haha, interesting to put things this way. Thanks for your time and creativity. 

Nic Brough -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.
August 25, 2020

It is totally counter-intuitive to us.  It works for the computers.  Sometimes I'm quite sad that I understand them on this level.

Still, I hope the example wasn't too convoluted, thank you for the "interesting", that's much appreciated!

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events