I have a query that returns 25 issues. Out of these 25 issues, 2 have label xxx.
I add to my JQL, AND Labels not in ("xxx") and I get 10 issues. I replace it with AND Labels in ("xxx") and I get 2 issues. Something here is wrong. Any ideas?
thanks
I guess out of the 25 issues 13 have no labels at all. That would explain the two other result sets (2 and 10).
Note: label not in (xxx) will display all issues where the label is different from xxx and not empty
I can't see the difference between your queries or how you are entering them, it just says "and labels in xxx" twice.
I suspect we might want to see the definitions of both queries in full. It can be important where and how a clause is added to a query. (If not, then re-indexing is the next step)
Sorry, obviously not enough coffee this morning.
Please Re-index.
if not he can do indexing through the groovy code for issues in the filter(25 issues) that he has mentioned.
it wont take much time I guess.
You don't know that indexing is the problem yet. It could be the structure of the query.
the JQL is : project = projectname AND resolution = Unresolved AND fixVersion = EMPTY AND labels in ("labelname")
Ah, good. Sort of. That query is not structured in a way that might be causing a problem. Straight clauses joined by "and"s are almost always straightforward.
So, now we need to ask you to test the effects of re-indexing
Any way I can capture the 23 tickets that I am looking for?
yes, use
AND (Labels not in ("xxx") or labels is EMPTY)
edit: sorry, this is how it should work
So, your query basically excludes the items which does not contain any label.
You can try this instead:
(labels != "LBL1" OR labels = null)
As per my understanding *[labels = null]* and [labels is EMPTY] doesn't makes any difference in results. I have tested with both the options and got the same result.
true, unless someone adds a label named "null"
Instead of
labels != xxxlabels not in (xxx, abc)
use
# Select ticket if missing the named label.NOT (labels = xxx)# Select ticket if missing ANY of the named labels.NOT (labels = xxx AND labels = abc)# Select ticket only if missing ALL of the named labels.NOT (labels in (xxx, abc))
These avoid having to check whether labels IS EMPTY.
It looks like you're new here. Sign in or register to get started.