Based on this article, you should be able to get the FULL changelog of an issue using get('/rest/api/2/issue/key/changelog')
When I try to use that it only gives me the 100 oldest changes. Any that were made past the first 100 are not returned. Is this article just incorrect? And if so is there ANY way to get the entire changelog for an issue?
Hi Andrew
Have you tried, as per the directions in the article, to work through more than just the first page? (i.e. the first 100?)
Using the ScriptRunner Script Console I return the entire Changelog result of the Get request, and it only shows 100 changes. Would it not return the entire thing this way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know I tried answering this question, but I only have Jira cloud and have never used ScriptRunner.
I suspect that it would be the same as when I use the REST API directly, which is limited in what it returns. Look at the beginning of the returned JSON and there should be some of :
startAt
maxResults
lastPage
These should give you a hint as to what is returned
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes I see what you mean there...I have tried adding ?maxResults=200 at the end of the query to get more but that doesn't seem to work. I'm able to access the end-results by adding ?startAt=100 or so but that isn't ideal since issues will have different size changelogs and would need to start elsewhere to get the proper changes...any idea how to change maxResults or otherwise get around this?
I suppose I could do an initial query to get the size of the Changelog and then adjust the startAt location accordingly and do another query but that seems inefficient
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrew
If they've said that it only returns 100 per page, you could put maxResults=10000 and you'd still only get 100.
In the header section there is usually a variable (possibly called total?) which tells you exactly how many records there are. So let's say you're trying to get 243 records :
Your first call will be ?startAt=0&maxResults=100 which gives you records 0 - 99
Your next call will be ?startAt=100&maxResults=100 giving records 100 - 199
Checking that 199 < total, your next call is ?startAt=200&maxResults=100 giving you records 200 - 242.
242 > total, so now you have them all :)
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.