I have an issue with getting worklog effectively.
Earlier my team was using JIRA Server and plugin "Timesheet Reports and Gadgets for JIRA". This plugin has endpoint to get all timesheet in one request, which was brilliant. Now we are using JIRA Cloud and "Timesheet Reports and Gadgets for Cloud" plugin - and it doesn't have API endpoint.
I've read in documentation, that the endpoint feature is not supported for now, and we should use JIRA API instead. I tried, but faced with great problem.
We have a few tickets with worklogs amount > 8000. That is expected, the way we work. Moreover, they are constant and "immortal", so worklogs amount increases every day.
I am doing next:
and worklogDate<=param_date_2 and worklogAuthor=param_user
In response, each ticket contains 20 worklogs.
These 20 worklogs are first 20 ticket worklogs, not filtered with given params, without possibility to fetch more, or to fetch last instead of first, or smth else. As far as I know, this is either expected behavior or known issue with low priority.
In our work such info is often not useful. So in case worklogs.total > 20, I do step 2:
This way has drawbacks. First, it requires separate request per issue. Second, it doesn't have any filters - startAt, maxResult, by user or startedDate... According to docs, the only param is "expand", which won't help a lot.
So in case of mentioned "immortal" tickets, this request returns thousands of worklog records at once and is very heavy. Which is senseless, as usually we need the last 10-20 records, not all thousands.
I tried also this endpoint:
But it also doesn't have any useful get params. If it had been possible to send issue Id or Key - it would have solved our troubles.
I also searched for plugins, but didn't found a simple light plugin for REST timesheet functionality. Maybe I don't know what to look for. I cannot use SQL or something similar - we don't have admin rights and we won't have them. So the only way is REST.
Is there some workaround for this problem?
Thanks in advance.
The approach you described is the only way to get worklogs through the REST API. I doubt you will find a cloud plugin with the REST timesheets point as cloud plugins actually rely on JIRA REST and there is no much sense to build custom REST upon JIRA REST API.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Atlas Camp is our developer event which will take place in Barcelona, Spain from the 6th -7th of September . This is a great opportunity to meet other developers and get n...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs