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
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.
Hello Trudy, this did the trick. Thank you so much for the explanation, I never really thought of it this way, but it makes complete sense. Appreciate your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have not tried excluding any other labels, but let me try this, thank you for responding so quickly.
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.
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.
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.
I am curious, if the != doesn't work with the labels field, but I also tried putting Triaged in the component field and I still didn't get all of the bugs that didn't have Triaged in the filed to come up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cliff, would you please post the exact query you are trying which checks the labels field? Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
project = project AND issuetype = Bug AND status = "Dev Backlog" AND labels NOT IN Triaged ORDER BY created DESC
I put in the new information you provided and I didn't get any issues to come up at all when I used this.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, this was discussed, but decided by the team to not change the workflow. The information Trudy provided me above did the trick. Thanks for your response!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad you got the filter working. I was going to also suggest a new custom tick box field for triaged and that is easy to filter on as well
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.