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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.