Problem with JQL query

Hi There,

I have used the following queries to retrieve required issues.

1. project in (ProjectA) AND assignee = "admin" AND status not in ("Closed") and resolution not in ("Won't Fix", "Cannot Reproduce", Duplicate)

2. project in (ProjectA) AND assignee = "admin" AND status not in ("Closed") and resolution in (Unresolved, Fixed)

Query 2 returned me with some matching issues but Query 1 showing no matching issues found.

Why the Query 1 not returning any matching issues as it is same as Query 2.?

Thanks & Regards,

Goutham

1 answer

1 accepted

2 votes

It's because the resolution field is behaving logically, which doesn't quite match the English interpretation of the JQL you've written.

I'm going to rephrase the resolution clauses in your two queries:

1. Resolution is set to something, but not "won't fix", "cannot reproduce" or "duplicate"

2. Resolution is not set, or it is set to "fixed"

Note that the first query has come out with "resolution is set to something". This is because an issue without a resolution actually effectively has "null", which can't be compared with a list of issues.

Try changing the clause to "(not in (x,y,z)) or unresolved)"

Hi Nic,

Thanks for your Response. So What should be my final Query.?

Thanks & Regards,

Goutham

Hi Nic,

Thanks for your Response. So What should be my Query.?

Thanks & Regards,

Goutham

Change the resolution related clause to what I said in my answer.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,965 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot