Need Help with JQL Query "Not in = label x"

Karen Brasch March 23, 2018

I'm writing a JQL query to give me status on a list of projects by key, but to exclude some labels.

The first part works:

Project in (XYZ, ABC)AND issueType = "Defect" AND status != Closed ORDER BY priority DESC.

But I also need it to exclude some labels. e.g. Not in label = TUV

I tried putting it in (), but that didn't work. 

Project in (XYZ, ABC)AND issueType = "Defect" AND status != Closed ORDER BY priority DESC (not in label = TUV)

Thank you!

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 23, 2018

The order by clause has to be the last in the query.

Label works the same way as other data like Project.  Try "Label not in (x, y, z)"

Karen Brasch March 23, 2018

THANKS for quick response. I wrote this, but JIRA didn't like it:

project in (XYZ,ABS) AND issueType = "Security Defect" AND status != Closed ORDER BY priority DESC "Label not in (TUV)" 

Jan-Peter Rusch
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.
March 24, 2018

As Nick wrote: Order by has to be the last in the query. Put AND label not in (TUV) Before the ORDER BY

Karen Brasch March 27, 2018

That makes sense. It is saying "field label does not exist or you do not have permission to view it." Hmmm.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 27, 2018

Ok, have a close look at what you've got it called in your system - it's labelS by default.

Karen Brasch March 27, 2018

THAT WORKED! You are my hero. Thank you. :-) !

Suggest an answer

Log in or Sign up to answer