Forums

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

JQL for (component does not equal "" but includes all other components, as well as empty)

Samantha February 21, 2023

I know that "!=" is the trigger for "not equal". However, in my instance, I want the JQL to reflect all tickets, except those that are populated with component A or B. So in essence. I want all tickets that are populated with any other component or tickets that do not have the component field populated to reflect.

3 answers

3 accepted

1 vote
Answer accepted
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.
February 21, 2023

Welcome to the Atlassian Community!

Yes, you need to account for empty fields.  Not equal to does not include empty fields (the logic, though it sounds wrong to humans, is correct - empty fields don't have anything to compare, so you can't equate "not equal to" with them)

Try

component not in (A,B) or component is empty

Samantha February 21, 2023

Worked like a dream. Thank you.

Like Nic Brough -Adaptavist- likes this
0 votes
Answer accepted
Dave Mathijs
Community Champion
February 21, 2023

Hi @Samantha welcome to the Atlassian Community!

Try the following JQL:

component != "A" OR component != "B" OR component is EMPTY
0 votes
Answer accepted
Craig Nodwell
Community Champion
February 21, 2023

Hi @Samantha welcome to the community.

Try
component not in(A,B) OR component is EMPTY

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.
February 21, 2023

I think there's a spelling mistake in there?  "and" should be "or"?

With and, that query will never return any issues, because an issue's component needs to be empty AND have a value of not A or B at the same time.

Like Craig Nodwell likes this
Craig Nodwell
Community Champion
February 21, 2023

Agree, and it was an OR and then I edited my answer ... it's been one of those kinds of days ugghh

Suggest an answer

Log in or Sign up to answer