REST API is ignoring 'order by' parameter. Following return result in the same order. Filter is: Key IN (PROJ-1, PROJ-2, PROJ-3). Sorting on other fields is ignored as well. Return result is always sorted on descending Key.
Tried this format as well. Same result.
Documentation does not mention order as an option. Has this been deprecated or I am making an incorrect request? How can I sort on Key?
Using JQL directly (instead of filter=12345) returned the same result.
I haven't used a filter in an API query, but I feel the issue might be that the sorting should be in the filter itself. Your orderBy statement isn't part of the jql= section and the API call for search doesn't (and never did) support orderBy.
So I believe there are 2 ways to correct this :
Thank you @Warren. Defining sort key/order in the saved filter is ignored as well. Jira server version ignores order in the saved filter and it is required adding it to the GET params. This, on server version, has worked for the past 4 years for us. We have moved from server to cloud and that does not work anymore.
Per your suggestion, I used the JQL directly in the call. That worked. However, it is not a viable option for us since the saved filter is used in a few places and changes regularly.
One more observation: Using the same saved filter in Google Docs's Atlassian add-on works fine.
I would appreciate all suggestions.
@Warren - Resolved.
"=" in filter=12345 must be encoded.
ORDER BY in GET overrides the one in the saved filter (if any). Correct behavior IMO.
To be on the safe side, I'm now encoding the entire parameter instead of using +
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events