Retrieve all Jira issue worklogs with Java

Lately I wanted to use the java jira client (jira-rest-java-client-core) to create custom reports for my work. Unfortunately, I found out the hard way that in case an issue had more than 20 worklogs, the client was only fetching the first 20.  I had no way to retrieve the rest using the client. Thus, I decided to create a very small java library that uses the Jira rest API in order to get all worklogs.
So, to get a list of all issue worklogs the following 2 lines are enough:
WorkLogClient client = new WorkLogClient(username, password, jiraUrl);
List<WorkLogItem> worklogs = client.fetchWorkLogs(issueKey);
Here is the repository of it on github:

Leave a Reply

Your email address will not be published. Required fields are marked *