The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

JQL condition does not include records where X is empty

Randy Dinh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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 Champions.
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
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 24, 2020

Exactly what I was looking for.  Thanks so much.

TAGS
AUG Leaders

Atlassian Community Events