Forums

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

How do I use the Atlassian SDK to retrieve worklogs if there are more than 5000 linked to an issue?

Kyle Pierson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 16, 2022

We have a small c# console application that retrieves timekeeping entries (worklogs) from our cloud JIRA account and inserts them into our on-prem database. As of 11/9/2022, no new worklogs were being inserted for a specific issue. Upon investigation, I see that Atlassian decided to limit the returned results for worklogs to a maximum of 5000. The most recent SDK, version 13.0.0, does not appear to support this change, unless I am missing something. There is no paging parameter for GetWorkLogsAsync within IIssueService. Right now, our code is making the following call, which returns a maximum of 5000 results:

var result = await _JiraClient.Issues.GetWorklogsAsync(key).ConfigureAwait(false);

 

The method signature for set method is:

Task<IEnumerable<Worklog>> GetWorklogsAsync(string issueKey, CancellationToken token = default(CancellationToken));

 

I see that the method GetIssuesFromJqlAsync contains an IssueSearchOptions that allows for paging via MaxIssuesPerRequest. I looked at the documentation in Jira Cloud Platform changelog (atlassian.com) regarding this, but I can find no properties within the SDK classes called "startAt" or "total." I am new to this, so I apologize if I am missing something glaringly obvious. Thanks for any input.

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events