Hi,
I want to retrieve the result of a saved filter through the REST API using /jira/rest/api/2/search. The filter definition contains an ordering by resolutiondate (I test also id). If I change the direction from ASC to DESC the order changes in the Jira UI but not in the json object returned by the REST call. Why? How can I retrieve an ordered result through REST?
Thanks!
Tuelle
Thanks for the tip, but this does not change the behavior.
Did you tried something like:
/rest/api/2/search?jql=project=TEST and status=closed&orderBy=-resolutiondate
If it does not work for you please post the rest call what exactly you were trying.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was trying
and
Both return a list of issues in the same order
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As a workaround you can use:
/rest/api/2/search?jql=project = TEST and resolution is not empty ORDER BY resolutiondate ASC&orderBy=-resolutiondate
Please try it and let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Thorsten Twellmann, Can you try adding the extra query parameter to your REST call which you want to order by as like below:
?orderBy=-resolutiondate
To order by "resolutiondate" descending
Hope this helps you. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.