I'm running into a query problem that I feel is a bug in JIRA's query language, but I am hoping I am wrong. Given the below query, the first line builds up a list and the 2nd should be filtering it down, which it does, but not as designed.
(filter = 23266 OR project in (WD, WC)) AND NOT
(component in (PBE) AND assignee is EMPTY)
ORDER BY Rank
My expectation for the above is that 2nd line would remove items found in the first line where the component is PBE and the assignee is EMPTY. It does this, but it is also removing items where the component is EMPTY and the assignee is EMPTY. Why?
UPDATE
Although I'm not entirely satisfied with the solution, it turns out this was an issue with my understanding of the use of NOT. The solution involved asking for everything I wanted instead of asking to leave out the one thing I didn't want. Makes for a pretty ugly query. Is a shame JQL does not handle this situation better.
(filter = 23266 OR project in (WD, WC)) AND (
(component is EMPTY AND assignee is EMPTY) OR
(component is EMPTY and assignee is not EMPTY) OR
(component != PBE AND assignee is not EMPTY) OR
(component != PBE AND assignee is EMPTY) OR
(component = PBE AND assignee is not EMPTY)
) ORDER BY Rank