Hi Experts,
I need help in configuring JQL query
Below is my Query,
In the results i would like to receive all issues from IMMI Project or issues labeled with 'IMMI' that are not labeled with BAU. Additionally I don't want to receive Test, "Project Issue", "Project Risk" issue types
My problem is: i don't receive Issues from the 'IMMI Project' that are not labeled with IMMI
(project = "IMMI Project" OR labels = IMMI) AND Type not in (Test, "Project Issue", "Project Risk") and labels != bau ORDER BY created DESC
Can you please help me understand why? and what should be the correct query?
Thanks
Naama
When in doubt,
So:
Hi @Nic Brough [Adaptavist] Thanks for your answer I know that i have the data to much this filter. When I query (project = "IMMI Project" OR labels = IMMI) AND Type not in (Test, "Project Issue", "Project Risk") I get all the issues from immi project and all the ones that are labeled with IMMI (from the relevant types) Only when i add != BAU, i get only the ones that are labeled with IMMI Can you please advise? Thanks Naama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, great testing, it eliminates some problems. Next thing to try is labels = immi and labels != bau If that does what you expect, then I think there's something odd with your (), although I can't see what. So I'd then try (labels = immi and labels != bau) or (project = immi and labels != bau)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Tried the followings (still i don't get IMMI project issue with no IMMI label) : ((project = "IMMI Project" and labels != bau ) OR labels = IMMI) AND Type not in (Test, "Project Issue", "Project Risk") and labels != bau ORDER BY created DESC ((labels = immi and labels != bau) or (project = immi and labels != bau)) AND Type not in (Test, "Project Issue", "Project Risk") and labels != bau ORDER BY created DESC -------- When I have run labels = immi AND labels != bau AND Type not in (Test, "Project Issue", "Project Risk") AND status != closed ORDER BY created DESC, status DESC, key ASC I got less results - when i checked the difference i saw that my first query receive issues from the project 'IMMI' only if they have any label - but when the label is empty it is not Can you please advise? Thanks Naama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need you to simplify - stop adding clauses and look at the absolute basics. What do you get from the two simple searches I gave earlier? Specifically, does the first one return *any* issues which have both IMMI and BAU as labels?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Query: labels = immi and labels != bau Result: Issues that are labeled with 'IMMI' and not with 'BAU' Query:(labels = immi and labels != bau) or (project = immi and labels != bau) Result: Issues that are labeled with 'IMMI' and not with 'BAU' BUT no issues from the project IMMI that has no label at all Can you please advise? Thanks Naama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, I have it. I am really sorry I have not been grasping the problem as quickly as I should have. I don't think I'd have got there without the simplification, and I certainly wouldn't have got it without your patience. There is nothing wrong with the first simple query, it's doing what you expect. The second query has a flaw though, one which is not obvious. The clause "labels != bau" assumes labels has a value, and hence excludes issues with null values. To tell you that a label is *not* BAU, it has to read all the labels on the issue. When there are no labels to check, it can't logically tell you that there isn't a BAU, so it can't give you a result! So... try this query: (labels = immi and labels != bau) or (project = immi and labels != bau) or (project = immi and labels is empty)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
p.s. yes, there's a lot of negatives in there, and it's not intuitive for us humans, as we don't usually think that there is a difference between null and none/0.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thanks a lot - it is working! Naama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Excellent! Sorry it took me so long to pick up the exact question and spot the actual problem!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try grouping the or clause and the and clause with parenthesis.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.