I am using the following filter to bring up bug issues that my team has not reviewed. When a bug is reviewed we place the word "Triaged" in the labels field, but for some reason this filter is not bringing up all the bugs that have not been Triaged. I am hoping someone can help me with this.
project = project AND issuetype = Bug AND status = "Dev Backlog" AND labels != Triaged ORDER BY created DESC
Hi @Cliff Perea -- Welcome to the Atlassian Community!
Do you have any issues with other labels, or no labels? If so, maybe try this adjustment:
project = projectName
AND issuetype = Bug
AND status = "Dev Backlog"
AND (labels NOT IN (Triaged) OR labels IS EMPTY)
ORDER BY created DESC
To clarify, what did not work? Were issues returned that you did not expect, or are there issues missing which you expected, or both?
When diagnosing a query it helps to look at specific example issues and try to understand why they are returned (or not), and then see what is different about them. That will help to adjust the query.
Or, uncover an actual defect in JQL to submit to Atlassian.
Hello @Cliff Perea
Regarding the Labels field, what are the possible scenarios for it?
1. An issue has no values in the Labels field.
2. An issue has only the value "Triaged" in the Labels field.
3. An issue has the value "Triaged" in the Labels field, plus 1..n other values in that field
4. An issue has 1..n values in the Labels field and none of those values is "Triaged".
You want to get the issues that are in category 1 and 4, right?
Including "labels is EMPTY" gets you category 1 issues.
To get all the issues in category 4, you need a condition that will exclude the issues that have "Triaged" in the Labels field:
Labels not in (Triaged)
You need to combine those two conditions to get issues that fall within either one of the conditions:
(Labels is empty or Labels not in (Triaged))
Combine this with the rest of your conditions:
project = project AND issuetype = Bug AND status = "Dev Backlog" AND (Labels is empty or Labels not in (Triaged))
If this is not returning the expected data, please provide a screen image of the jql statement in the Search screen, and a screen image (including the project, issue type, and status, and Labels values) for an issue you think should be in the results set but that is not in the results set.
If you use just the condition
Labels not in (Triaged)
...then you will get only issues that have at least 1 value in the Labels field and none of the values is "Triaged". This condition will NOT return issues that have no values at all in the Labels field.
it is likely to be the above, a combination of 'is empty'. But can I suggest an alternative which is to have triaged as a step in the workflow?
Labels are tricky as they are manually entered and open to human error, spelling etc.
There are also weird occurrences in labels where capitilasiation is considered different and also the same that unnerves me.
Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events