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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL condition does not include records where X is empty

The JQL statement below returns what I expected.

Project = "XYZ" AND Type = Bug AND Status != Done AND Creator = currentUser() ORDER BY createdDate DESC

However I want to filter out any records with the Label = Crash. 

So I added an additional condition to the statement. 

Project = "XYZ" AND Type = Bug AND Status != Done AND Labels != Crash AND Creator = currentUser() ORDER BY createdDate DESC

The problem is that the query does not return records where Labels is empty. 

Is this expected?  What can I add to the statement that would include those records?

1 answer

1 accepted

2 votes
Answer accepted
Payne Community Leader Jan 24, 2020

Yes, adding that will limit the result set to only issues containing one or more labels. To also include issues without labels, you can do this:

Project = "XYZ" AND Type = Bug AND Status != Done AND (Labels is empty or Labels != Crash) AND Creator = currentUser() ORDER BY createdDate DESC

Exactly what I was looking for.  Thanks so much.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you