Worklogs for date range via REST API

Tom King June 13, 2016

So the REST API documentation only shows a method for getting worklogs UPDATED since a certain date.
(https://docs.atlassian.com/jira/REST/cloud/#api/2/worklog-getIdsOfWorklogsModifiedSince

We need worklogs logged as starting on or after a certain date. The reason the updated method will not be appropriate for us is someone may edit the comment or log the work a few days after it took place and then it would not show in the report we write.

Unfortunately the only method I can see of accurately gathering all worklogs with a started date within a certain range is to get all issues, check all their worklogs, and then compile a list of all that meet my criteria.
An instant issue with this is the resource drain this will cause as more and more issues, and worklogs are added to the system.

Surely there should be a simple way to ask the API for worklogs with a logged start date after a given date???
Seems crazy that there isnt! 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
cirosantilli December 15, 2017

posted something wrong, please ignore

Isaac Abramowitz May 8, 2019

That's literally the same question... Not a similar question, but the same link to the same page. I think you copied the wrong link

cirosantilli May 8, 2019

Oopps, you're right. And now I can't find out how to delete my answer and too lazy to search for the one I meant to link to. :-(

0 votes
Projector Developer August 30, 2016

I'm a little late to this question, but I am also looking for the same thing.  Here is what I found through my research:

For those using JIRA Server, there is an add-on that can accomplish this: https://marketplace.atlassian.com/plugins/org.everit.jira.worklog.query.plugin.core/server/overview

If you are using Tempo timesheets, they have an API endpoint that will accomplish this: http://tempo.io/doc/timesheets/api/rest/latest/#848933329

There are a few undocumented JQL fields that can help with the filtering, but note that this just limits which issues are returned and along with them the entire worklog (so you still need to loop through the worklog to find the relevant one(s), but it should be a simpler task):

<BASE_URL>/rest/api/latest/search?jql=worklogDate>'2016-01-01' AND worklogAuthor='agent'&fields=worklog

This website has a little more detail: http://www.jiratimesheet.com/wiki/RESTful_endpoint.html

 

TAGS
AUG Leaders

Atlassian Community Events