I've read the "Advanced searching" help article and specifically example 1 of the precedence section.
The results of my query do not exclude "Resolved" or "Closed" tickets. How do I need to reword this query? I want to get a list of tickets that still need work to be done on them, regardless of the current status. Tickets with a status of "Resolved" or "Closed" do not need any work done on them.
assignee = currentUser() AND summary ~ "bla bla bla" and (status != Resolved OR status != Closed) order by key desc
If I remove the brackets and either `status !=` query, I get the expected results. In the below screenshot, the green "Closed" status should not be part of the results returned.
Hi @Ian C_
The issue is the OR within the parentheses.
This way JQL reads your original JQL is that it should include issues which are either not in Resolved (i.e Closed issues) OR issues which are not in Closed (i.e Resolved Issues). You're almost cancelling out the search limitation.
---------------------------
Your original JQL would work if you changed the OR to an AND:
assignee = currentUser() AND (status != Closed AND status != Resolved)
^ That way, JQL reads it that issues should not be either status - rather than either/or. This is the same effect as using NOT, like in your second query.
The cleaner option is to use NOT IN - which aligns the same action to all issues within the parentheses:
assignee = currentUser() and status NOT IN (Closed, Resolved)
---------------------------
Another alternative for incomplete issues is to filter by resolution - i.e issues with no resolution:
assignee = currentUser() and resolution IS EMPTY
And further, if you want to filter out all statuses with a status category of Done (i.e green statuses) you could use:
assignee = currentUser() and statusCategory != Done
---------------------------
Lots of options for status - but in general - NOT IN is a good option for removing multiple options from the same field in JQL searches.
Ste
This give me the required results
assignee = currentUser() and summary ~ "bla bla bla" and not (status = Resolved OR status = Closed) order by key desc
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.