-
Type:
Bug
-
Resolution: Low Engagement
-
Priority:
Low
-
None
-
Affects Version/s: 7.3.2, 7.12.1
-
Component/s: REST API
-
7.03
-
1
-
Severity 3 - Minor
-
0
Summary
If a user doesn't exist and you use a rest call like /rest/api/2/search?jql=assignee was admin, then Jira will return 400 Bad Request error rather than a warning that the user doesn't exist.
Steps to Reproduce
- Create a TestUser
- Create an issue, and assign it to TestUser
- Assign the issue to another user, or unassign it
- Delete the TestUser account
- Execute the following REST call (since it's a GET, you can browse to it directly):
$jira-url/rest/api/2/search?jql=assignee%20was%20testuser
Expected Results
The REST API should return a 200 OK response, with the warning message that the user does not exist. This is the behaviour when the query is assignee = testuser for example.
Actual Results
The REST API returns a 400 Bad Request response, with the warning message that the user does not exists.
Workaround
Performing a POST with the JQL as JSON data should return the results correctly. For example:
curl -X "POST" "http://localhost:47121/j7121/rest/api/2/search" \ -u 'username:password' \ -d $'{"jql": "assignee was testuser"}'
Notes
We notice the same issue in the UI too, where '=' is a warning and 'was' is an error