Changelogs sorting/limitation REST API

HI community

I have faced discrepancy in docs & results
here was anounced limitation and sorting “100 most recent items”
https://developer.atlassian.com/cloud/jira/platform/change-notice-changelogs-are-now-limited-to-the-100-most-recent-items/

but /rest/api/2/search?expand=changelog returns changelog without limitation

and here https://docs.atlassian.com/jira/REST/cloud/#api/2/issue/{issueIdOrKey}/changelog-getChangeLogs
written “sorted by date, starting from the latest.” but even example below sorted another direction (same on real usage)

So qustions are:

  1. will be expand=changelog limited at nearest future?
  2. I prefer sorting from oldest, is current docs contain mistake or direction will be changed soon.
  3. /issue returns changelogs array in property ‘histories’ against ‘values’ in /changelog, seems inconsistent.

Thanks in advance.

Hey @avelit,

Regarding your questions:

  1. We’re currently working on implementing the limit to 100 items in the changelog, and it should be soon in production.
  2. Apparently the results are sorted from the oldest and we’ve got inconsistency in documentation.
  3. This is correct because ‘values’ is part of our pagination API.

Hope that helps.
Cheers, eve

@avelit, just wanted to confirm that the limit of 100 changelogs returned by api/2/search and /rest/api/2/issue/ endpoints is now in place. As part of the limitation, we changed the default ordering of changelogs returned by these endpoints from ascending to descending. The reason being that for limited number of items, we want to always provide the most relevant (ie. the most recent) issue changes.

However, the /rest/api/2/issue/{issueIdOrKey}/changelog endpoint that returns all issue changelogs in a paginated list, is ordered as ascending (oldest first).

@istankiewicz, thanks for valuable information. we should change some code due to this information because now 2 rest-ends uncompatible due to different orders. We expected read first 100 with expand=changelog and to add all the rest but now we should use only 1 endpoint.

Hi @istankiewicz,

Could you please clarify, if /rest/api/2/issue/{issueIdOrKey}/changelog endpoint is going to be available in Jira Server too? I can’t see it in latest 5.6 documentation at least: https://docs.atlassian.com/jira/REST/7.6.0-m0125/#api/2/issue

Thank you.