Using JQL to exclude a field option

Phill Jones June 8, 2021

So my users want 2 queues, one queue uses the input of one field and the other queue would use the input of another field, all in the same project.  So right now I have the first queue setup where it pulls from a field and sorts it into that queue, and the same for the second queue. These all work great, but the second queue is based on a response to a field that both use, however, they want the tickets to be removed from the first queue and go to the second one, not show up in both. The problem is I cannot seem to be able to exclude only the specific inputs from the second field in the first queue to get it to drop from that queue.

Also for the first field it is a multi selection, and for the second field it is a single drop down menu which has about 7 options but only 2 of them sort into the second queue.

What I have for queue 1 looks like this and it says the queue is empty, which it should not be.
issuetype = "Project" AND resolution = Unresolved AND "Field 1" in (Option 1, Option 2, Option 3) AND "Field 2" != ("Option 6", "Option 7")

If I exclude `AND "Field 2" != ("Option 6", "Option 7")` it works normally but obviously has the tickets that are in the second queue.

 

For queue 2 I have, this works as expected:
issuetype = "Project" AND resolution = Unresolved AND "Field 2" = ("Option 6", "Option 7")

I hope this is clear and someone may be able to see what is going on. I can provide more context as needed as well.

3 answers

1 accepted

1 vote
Answer accepted
Phill Jones June 8, 2021

So I fixed it by being more specific on my queries vs trying to exclude the other options, I think it looks messier and is harder to understand but basically I included an empty field for the the second field option and the specific one it could be given and just added those as AND statements.

2 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 8, 2021

Haven’t tested but should it be …  "Field 2" not in ("Option 6", "Option 7")

Phill Jones June 8, 2021

So I have done that and it returns that the queue is empty, which it should not be, I have multiple tests and only 2 should be excluded but its not finding the other 10 or so that fit the other conditions. For some reason if I exclude those choices it seems to exclude all of them.

0 votes
chrisjordan June 8, 2021

I haven't tested it, but it should be... "Field 2" is not included ("Option 6", "Option 7")

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events