Why my JQL search with "not in" or "!=" (not equals) operators has issues missing
プラットフォームについて: Cloud、Server、および Data Center - この記事はすべてのプラットフォームに等しく適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
要約
When performing a JQL search for issues not in a category or without a label, for example, using the "not in" or "!=" (not equals) operators, some are left out.
原因
Some fields in Jira are actually relationships. When we tell JQL something like:
assignee not in ("user1","user2")
As described in Advanced search reference - JQL operators, what Jira really understands is: "to get all issues with assignees different from user1 and user2". The result is that unassigned issues will not show up.
Likewise, the query below brings issues with labels that are different from "important".
project = "My Project" and labels != important
ソリューション
All we have to do is add is EMPTY
with an or
statement. Taking the examples from above:
assignee not in ("user1","user2") or assignee is EMPTY
In the labels example:
project = "My Project" and (labels != important or labels is EMPTY)