-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Work Item - Search - Backend - JSIS
-
None
-
Minor
Issue Summary
When using JQL like issue.property != "value" via the Match API or webhooks, issues where the property has never been set are incorrectly returned. Standard JQL search in the issue navigator behaves as expected; this problem is specific to issue match (match REST API and webhooks). This bug affects the semantics of `issue.property` in the Match API/webhooks and makes them inconsistent with standard JQL evaluation.
Steps to Reproduce
- In a Jira Cloud project, create three issues:
- Issue 1: set an issue property, for example issue.property[key].path = "a".
- Issue 2: set issue.property[key].path = "ab".
- Issue 3: leave issue.property[key].path unset (do not set this property at all).
- In Jira's Issue Navigator (NIN), run this JQL: issue.property[key].path != "a"
Result in NIN:- Only Issue 2 is returned.
- This is the expected behavior: only issues where the property exists and is not equal to "a" are returned.
- Now call the Match API with the same JQL:
- Endpoint: POST /rest/api/3/match
- Body:
jqls: [issue.property[key].path != "a"]
- Result in Match API (and webhooks that use it):
- Issue 2 is returned.
- Issue 3 (where issue.property[path].value is not set at all) is also returned.
Expected Results
JQL evaluation for issue properties in Match API and webhooks should be consistent with:
- Jira's Issue Navigator, and
- Other standard fields like assignee and reporter.
For a query like issue.property[key].path != "a":
- Only issues where the property exists and its value is not "a" should match.
- Issues where the property has never been set should not match.
Using the example above:
For issue.property[key].path != "a":
- Expected: only Issue 2 is returned.
- Issue 3 should not be returned because the property is not set.
Actual Results
In Match API and webhooks:
- Issues where the issue property is not set at all are treated as if they satisfy:
- issue.property[key].path!= "a"
This means:
- The same JQL returns different results in NIN versus Match API/webhooks.
- Issue properties behave differently from other JQL fields, where unset values do not match != queries.
Workaround
To find issues where a property is either not set or has a value other than "a", use one of the following JQL queries:
- issue.property[key].path != "a" OR issue.property[key].path IS EMPTY
- issue.property[key].path != "a" OR issue.property[key].path = EMPTY
To find issues where the property is set but does not equal "a", use one of these queries instead:
- issue.property[key].path != "a" AND issue.property[key].path IS NOT EMPTY
- issue.property[key].path != "a" AND issue.property[key].path != EMPTY