How to get issues changelog with Jira Java Client

Tasho Georgiev February 1, 2022

When making a simple HTTP request, adding the query parameter 'expand=changelog' adds the changelog info to each issue:>-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 but I want avoid forking the original client.

So how can I get issues changelog data? 

1 answer

0 votes
Andreas Malerz April 4, 2024

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.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events