When making a simple HTTP request, adding the query parameter 'expand=changelog' adds the changelog info to each issue:
https://atlassian.net/rest/api/3/search?jql=updated>-1d&expand=changelog
but I can't find a way to make a call for the changelogs from the Jira Java client, which calls this method:
public Promise<SearchResult> searchJql(@Nullable String jql, @Nullable Integer maxResults, @Nullable Integer startAt, @Nullable Set<String> fields)
I read this question https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-use-expanded-fields-for-search-with-jira-rest-java-client/qaq-p/532535 but I want avoid forking the original client.
So how can I get issues changelog data?
We had a similar issue and found out that with JAVA API JQL responses will never contain the changelog. An easy solution was to collect all issues via JQL and afterwards read all issues again with:
restClient.getIssueClient().getIssue( issueKey, List.of( IssueRestClient.Expandos.CHANGELOG ) );
That worked for us.
Keep in mind, that this will generate some traffic on your server as you send n+1 requests with n is the number of found issues.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.