Best way to get issue key and summary from worklog

Right now I’m calling https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-worklog-updated-get and then JQL to get the issue key and summary. So 2 calls.

Is this how it is supposed to be done? Or is there a better way?

I don’t have a solution (can’t find a way to get issueKey on GET worklog request); but perhaps if you could explain your scenario from the start, we can find a solution to getting it down to a single API call.

I want to export all the work that has been done in a certain month to our billing software. We send our customers detailed invoices. So we need exact time, user, issue key and summary.

Not a code, but a product solution instead:

Worklogs Report: simple and straightforward
Pivot Report: a lot more powerful app that supports worklogs as well

Both have export to Excel, both work with specified period.

We develop both of the add-ons, so you need a demo or have a question, please don’t hesitate to contact me.

Hi @maarten.de.block,

The API you have mentioned is designed to supplement worklog webhooks and help bulk consumers of worklogs validate that they have not missed webhooks. In order to be performant, it is intentionally designed not to return issue details.

For your case, I would recommend using the issue search API and JQL. For example, the JQL query worklogDate > startOfMonth() would return all issues that have a worklog created since the beginning of the current month.

So the full API request would be something like GET https://example.atlassian.net/rest/api/2/search?jql=worklogDate%20%3E%3D%20startOfMonth()&fields=assignee,summary,worklog

Hope this helps,
Dave

2 Likes

Hi @dmeyer!

Any chance to have API for getting worklogs not by the time of the creation but by the time of the worklog itself?

1 Like

@dmitry.astapkovich, not at this time, you will need to use the API you originally linked. This functionality is provided by a number of third-party apps as well.

So sad to hear that =(

1 Like

@dmitry.astapkovich – searching Marketplace for JQL (filter cloud) you will indeed find several vendors that provide advanced index/search capabilities. Perhaps it’s worth trying some out.

Is there any good reason it’s not a default behavior of the system? For what good reason may the modification date be more important then the actual date of the worklog?

All third party apps do the same: first they look for all the worklogs and index them, after that they watch fot the new worklogs and index them as well. I know that because we have implemented that functionality in the report we develop. But honestly it looks really strange.

@nmansilla, have you seen my question? Could you please comment in that?

@dmitry.astapkovich - re: a good reason, no, I don’t. Here’s what I can recommend – submit a feature request at http://go.atlassian.com/devhelp . I recommend being as verbose as possible so that Jira Cloud product team knows exactly what you’re trying to accomplish.

1 Like

Thanks for the idea! We started conversation here: https://ecosystem.atlassian.net/servicedesk/customer/portal/14/DEVHELP-1010

1 Like