-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
6.3.9, 6.4.6, 9.15.1, 10.2.1
-
6.03
-
2
-
Severity 3 - Minor
-
0
-
Summary
A Filter's ORDERBY clause is not maintained through REST API
Steps to Reproduce
- Created a filter with below JQL.
project = KANBAN ORDER BY created ASC
- Make a request to endpoint Perform search with JQL.
curl --request POST \ --url 'https://test.prod.atl-cd.net/jira/rest/api/2/search' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' --data '{"jql":"filter = \"Filter for KANBAN board\"","startAt":0,"maxResults":50,"fields":["issuetype","issuekey","summary","created","parent"],"validateQuery":true}'
Expected Results
We should get the list of Issues from this filter, and the order of the issue should also be maintained like below screenshot.
Actual Results
The JSON results of the issue filter are not maintained. The JSON is always ordered by key descending, regardless of the ORDERBY clause in the filter.
{ "expand": "schema,names", "startAt": 0, "maxResults": 16, "total": 16, "issues": [ { "expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields", "id": "10038", "self": "https://test.prod.atl-cd.net/jira/rest/api/2/issue/10038", "key": "KANBAN-16", "fields": { "summary": "Issues like this one that are marked as fixed in a released version do not show up in Work mode but are included in the reports", "issuetype": { "self": "https://test.prod.atl-cd.net/jira/rest/api/2/issuetype/10002", "id": "10002", "description": "A task that needs to be done.", "iconUrl": "https://test.prod.atl-cd.net/jira/secure/viewavatar?size=xsmall&avatarId=10318&avatarType=issuetype", "name": "Task", "subtask": false, "avatarId": 10318 }, "created": "2021-03-17T05:31:43.000+0000" }, "renderedFields": null }, { "expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields", "id": "10037", "self": "https://test.prod.atl-cd.net/jira/rest/api/2/issue/10037", "key": "KANBAN-15", "fields": { "summary": "Issues like this one that are marked as fixed in a released version do not show up in Work mode but are included in the reports", "issuetype": { "self": "https://test.prod.atl-cd.net/jira/rest/api/2/issuetype/10002", "id": "10002", "description": "A task that needs to be done.", "iconUrl": "https://test.prod.atl-cd.net/jira/secure/viewavatar?size=xsmall&avatarId=10318&avatarType=issuetype", "name": "Task", "subtask": false, "avatarId": 10318 }, "created": "2021-03-15T05:59:43.000+0000" }, "renderedFields": null }, { "expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields", "id": "10036", "self": "https://test.prod.atl-cd.net/jira/rest/api/2/issue/10036", "key": "KANBAN-14", "fields": { "summary": "Issues like this one that are marked as fixed in a released version do not show up in Work mode but are included in the reports", "issuetype": { "self": "https://test.prod.atl-cd.net/jira/rest/api/2/issuetype/10002", "id": "10002", "description": "A task that needs to be done.", "iconUrl": "https://test.prod.atl-cd.net/jira/secure/viewavatar?size=xsmall&avatarId=10318&avatarType=issuetype", "name": "Task", "subtask": false, "avatarId": 10318 }, "created": "2021-03-11T21:53:43.000+0000" }, "renderedFields": null }, { "expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields", "id": "10035", "self": "https://test.prod.atl-cd.net/jira/rest/api/2/issue/10035", "key": "KANBAN-13", "fields": { "summary": "Issues like this one that are marked as fixed in a released version do not show up in Work mode but are included in the reports", "issuetype": { "self": "https://test.prod.atl-cd.net/jira/rest/api/2/issuetype/10002", "id": "10002", "description": "A task that needs to be done.", "iconUrl": "https://test.prod.atl-cd.net/jira/secure/viewavatar?size=xsmall&avatarId=10318&avatarType=issuetype", "name": "Task", "subtask": false, "avatarId": 10318 }, "created": "2021-03-13T21:38:43.000+0000" }, "renderedFields": null } ], "warningMessages": null, "names": null, "schema": null }
Notes
Related to verified bug ticket - https://jira.atlassian.com/browse/JRA-37959
Workaround
There is no workaround, as REST API for JIRA doesn't have an ORDERBY clause for JQL.
- is related to
-
JRASERVER-37959 Filter Id based searches are not preserving the ORDER BY sort order clause
-
- Gathering Impact
-