How do I set maxResults for work logs?

Scott Cline August 19, 2014
I'm running Jira on a server with the Timesheet add-on. I'm using the REST API interface to get work log data. I'm using the [ search?jql=key in workedIssues("2013/10/14","2013/10/14","jira-developers")&fields=worklog ]
syntax which works fine -- almost. The problem I'm running into is for issues that have more than 20 work logs, I don't know how to specify the maxResults value (or use a startAt) to get the remaining work logs. I get this in my data: ..."worklog":{"startAt":0,"maxResults":20,"total":166,"worklogs"...
I get the first 20 work logs. How can I get the other 146 work logs?

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Scott Cline August 25, 2014

Not having much luck with the suggested alternatives. Looks like I can get the worklog data directly from the worklog table in the database which should suffice until the bug limiting worlogs to 20 is fixed.

1 vote
Andriy Zhdanov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2014

Please see ACJIRA-72

Scott Cline August 21, 2014

Is there any other way to access the worklog data since the REST API mechanism isn't currently returning more than 20 entries?

Andriy Zhdanov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 21, 2014

Yes, with separate /issue/{issueIdOrKey}/worklog request or using /rest/timesheet-gadget/1.0/raw-timesheet.json from the plugin, as described here.

0 votes
Alexey_Rjeutski__Polontech_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2014

the maximum number of issues to return (defaults to 50). The maximum allowable value is dictated by the JIRA property 'jira.search.views.default.max'. If you specify a value that is higher than this number, your search results will be truncate. Please check this variable.

try search?jql=key in workedIssues("2013/10/14","2013/10/14","jira-developers")&fields=worklog&startAt=0&maxResults=50 - if it will return more than 20 - then check the variable

Alexey_Rjeutski__Polontech_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2014
Andriy Zhdanov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2014

Alexey, question is about number of worklogs returned per issue in the search result, not number of issues.

0 votes
Andriy Zhdanov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2014

Well maxResults=1000 does not help :( See also related question.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events