Hi Community,
I am trying to create a filter where I want to filter out work items with label having "Engineering". With the below query I am getting 0 results, but I should be getting 5 counts.
What is going wrong here?
project = ABC
AND type IN (Feature, Initiative, "New Feature")
AND statuscategory IN ("In Progress", New)
AND labels != Engineering
ORDER BY Rank ASC
Hi @Kaushal Kumar Singh
Thanks for the question.
If you want to find tickets that have the label "Engineering", in your provided JQL, you put !=, which means you exclude those ones.
I think the following one will work, if you want all tickets, with the mentioned label.
project = ABC
AND issuetype IN (Feature, Initiative, "New Feature")
AND (statusCategory = "In Progress" OR status = "New")
AND (labels IN (engineering))
ORDER BY Rank ASC
If you want tickets that don't contain "the Engineering" label, you can use this one.
project = ABC
AND issuetype IN (Feature, Initiative, "New Feature")
AND (statusCategory = "In Progress" OR status = "New")
AND (labels IS EMPTY OR labels NOT IN (engineering))
ORDER BY Rank ASC
Let me know if this works for you.
Thanks @Gor Greyan - The second one worked as I wanted to exclude the label.
AND (labels IS EMPTY OR labels NOT IN (engineering))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Kaushal Kumar Singh
Glad that it helps.
Have a nice day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kaushal Kumar Singh ,
The issue occurs because labels is a multi-value field in Jira, and using the != operator doesn’t work as expected for such fields. The condition labels != Engineering may return zero results since Jira doesn’t handle multi-select fields this way. To correctly exclude issues that have the label Engineering, you should use the NOT IN operator instead. The correct query is:
project = ABC
AND type IN (Feature, Initiative, "New Feature")
AND statusCategory IN ("In Progress", New)
AND labels NOT IN (Engineering)
ORDER BY Rank ASC
This query properly filters out issues that contain the Engineering label while including all others. If you still get no results, double-check for label spelling or case differences (e.g., engineering vs Engineering).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.