I'm trying to create a JQL query with multiple ANDs and then the last two fields (Fix Version and Epic) I want results returned if either of them match, but I'm struggling. This is what I currently have:
project = Project AND status in ("status 1", "status 2", "status 3") AND creator in ("creator 1, "creator 2", "creator 3") AND (fixVersion != "Version 1" or fixVersion is EMPTY) AND "Epic Link" is EMPTY ORDER BY fixVersion ASC, created DESC
This seems to work correctly. But, if a given issue doesn't have a Fix Version and I add one, that issue is removed from the list even if it has no Epic Link. What I want is it to remain in the list if it still doesn't have an Epic link.
I tried changing it to OR "Epic Link" but this then seemed to ignore the rest of the query and just gave me everything without an Epic Link.
Can anyone see how to get what I want?
This should fix your issue, as far as I could deduce from your question:
Add ( )
and fix the logic error (OR, not AND!)
project = Project
AND status in ("status 1", "status 2", "status 3")
AND creator in ("creator 1, "creator 2", "creator 3")
AND ( fixVersion != "Version 1"
OR fixVersion is EMPTY
OR "Epic Link" is EMPTY )
ORDER BY fixVersion ASC, created DESC