Forums

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

Using != in JQL with Labels

Whitney Bell September 16, 2021

I created a custom JQL query/filter to use with a Kanban. This appears to work in the sense that any issues with the label 'Workflows' does not show up on that board (or in the filter results), BUT, issues with NO label also do not show up on that board. How do I adjust my JQL so that issues with no label that are attached to the 'WMT' component will show on my WMT board. Query below: 

project = AZTB AND component = WMT AND labels != Workflows ORDER BY labels DESC, created DESC

4 answers

2 accepted

3 votes
Answer accepted
John Funk
Community Champion
September 16, 2021

Hi Whitney - Welcome to the Atlassian Community!

If that is working for you so far, try this:

project = AZTB AND component = WMT AND (labels != Workflows or labels is empty) ORDER BY labels DESC, created DESC

John Funk
Community Champion
September 16, 2021

Great! Glad that worked for you! Can you click on the Accept Answer button so we can close this out? Thanks!

Like • Brenda Medellin likes this
1 vote
Answer accepted
Jose Luis Gaitan
Community Champion
September 16, 2021

Hello, @Whitney Bell ;

If you want to show issues with no labels, you could try to probe something like that:

project = AZTB AND component = WMT AND (labels is EMPTY OR labels != Workflows ) ORDER BY labels DESC, created DESC

0 votes
Keith Robertson August 28, 2023

Instead of

labels != Workflows

labels not in (Workflows, API)

use

# Select ticket if missing the named label.
NOT (labels = Workflows)

# Select ticket if missing ANY of the named labels.
NOT (labels = Workflows AND labels = API)

# Select ticket only if missing ALL of the named labels.
NOT (labels in (Workflows, API))

These avoid having to check whether labels IS EMPTY.

0 votes
Whitney Bell September 16, 2021

You guys are the bomb.com - this worked! THANK YOU :) 

Jose Luis Gaitan
Community Champion
September 16, 2021

thanks to you and I hope you enjoy our Community.

:)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events