Hello,
we have a project DP with some issues labeled with "CR".
If I use the JQL query
project = DP AND type = Requirement AND labels in (CR)
I get the correct result. But if I use the JQL query
project = DP AND type = Requirement AND not labels in (CR)
I get a empty result, which isn't true.
I can't see an error in the log.
Could you help, please?
Kind regards
Stephan
My guess is that it is working fine, but you are not looking for issues that do not have any label (which is not the same as "has a label which is not X", which is what your search says)
I think you want to search for both cases:
and (labels != CR or labels is empty)
thanks - that sorted my issue :-) @Nic Brough -Adaptavist-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Nic Brough -Adaptavist- , this fixed my issue as well. I always forget about the possibility of the Labels field being empty, and the "not" criteria on the JQL filtering that out too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, you are all right! But I made a mistake, I used "labels not in (CR)" and I get no result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just try following JQL and see the result
labels not in (CR)
project = DP AND labels not in (CR)
type = Requirement AND labels not in (CR)
And also try to perform the indexing on Project DP and then check again
Might be indexing issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does it help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I hoped also it is an indexing issue, but after indexing there is no change.
I tried some tests with different JQL queries:
Queries 2., 4. and 6. (all with negation ... not in...") are wrong. Until now I don't know why.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @stephan71
The JQL query of
labels not in (CR)
is only going to return to your issues that have some value for labels and does not contain the CR label. It actually is not returning issues that have no value (otherwise known a null value) for that labels field.
In your case, try changing the query above to be
(labels not in (CR) OR labels is EMPTY)
and see if that returns the expected number of issues.
I hope this helps.
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for your further explanation, now I understand. Then the answer from Nic Brough _Adaptavist_ was also correct.
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.
If you run a search query on JIRA and JQL, it returns the search result. One of the fields displayed after the search result is "Labels" which displays all the labels attached to issues. If you search for issues that are created by a particular assignee, then the "Labels" field will contain a list of labels attached to issues created by that particular assignee.
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.