Complementary queries on inclusion and exclusion of a label does not sum to total (exclusion fails)

Harshit Gupta
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!
December 24, 2024

Say, I have some 6286 JIRA Tickets of some type (Test Case) in a project (MCAL)

image.png

When I search for matching labels, I get the right count (I know as I created only 14 of them)

image.png

But, this shall mean that 6286 - 14 = 6272 Issues do not have this one label which I want to exclude.

However, searching for them only yields ~1781 issues

image.png

Trying to negate the query with `... NOT labels = <label>`, `... labels NOT IN (<label>)`, `... NOT labels = <label>`, all of these have returned the same count of 1781 as shown.

I am on JIRA v9.12.13 release. Please check the case and suggest on what is wrong with the above was to search for the issues without a given label?

1 answer

0 votes
Kseniia Trushnikova
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 24, 2024

Hi @Harshit Gupta,

Your JQL query does not include tickets with no labels.

Add "OR labels is EMPTY" to the JQL query:

project = MCAL and type = "Test Case" and (labels != LDRA_Automation OR labels is EMPTY)

 Let me know if it helps.

Suggest an answer

Log in or Sign up to answer