-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Component/s: Work Item - Search - Backend - JVIS
-
None
-
Severity 2 - Major
Issue Summary
Calling POST /rest/api/3/jql/match with assignee in JQL (like assignee = Vitaliy Ushanov) returns no matches when POST /rest/api/3/search shows the JQL should match.
Steps to Reproduce
- User “Vitaliy Ushanov” in Jira is assigned to the issue with id 10618. Replace user name and issue id in steps below.
- POST to the search api with body:
{ "expand": [ "names" ], "jql": "assignee = \"Vitaliy Ushanov\"", "maxResults": 15, "fieldsByKeys": false, "fields": [ "assignee" ], "startAt": 0 }Confirm results in json similar to:
{ "expand": "schema,names", "startAt": 0, "maxResults": 15, "total": 27, "issues": [ { "expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields", "id": "10618", ...Note the first issue found.
- POST to the match api with body (using the same jql and the issue noted from first step above):
{ "issueIds": [ 10618 ], "jqls": [ "assignee = \"Vitaliy Ushanov\"" ] }
Expected Results
The expected result is the issue matches similar to:
{
"matches": [
{
"matchedIssues": [
10618
],
"errors": []
}
]
}
Actual Results
The actual result is no matches are found.
{
"matches": [
{
"matchedIssues": [],
"errors": []
}
]
}
Single quotes in name (‘Vitaliy Ushanov’) don’t help.
Workaround
Replace full user name in jql by its id in request body:
{
"issueIds": [
10618
],
"jqls": [
"assignee = 5d2f56472d76f30c36bf88ce"
]
}
Now the match result is correct and the issue with id 10618 is found:
{
"matches": [
{
"matchedIssues": [
10618
],
"errors": []
}
]
}
The problem with this as "workaround" is this isn't the actual JQL that works in both UI and search API.
- mentioned in
-
Page Loading...