The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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:

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? 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events