JQL condition does not include records where X is empty

Randy Dinh January 24, 2020

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
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.
January 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
Randy Dinh January 24, 2020

Exactly what I was looking for.  Thanks so much.

Suggest an answer

Log in or Sign up to answer