Hello!
Sorry if this was already asked and answered, but I couldn't find any suitable answer for my problem.
The story:
I'm currently working on a PHP project what involves a simple doughnut chart what will represent the users worklog for the current day (it's basically a "time tracker"):
worklog_chart.png
What I'm currently using to get this data is the following curl call:
/rest/api/2/search?startIndex=0&maxResults=100&jql=worklogAuthor=test+and+worklogDate=%272017-01-01%27&fields=timespent
and this is the respone:
{"expand":"names,schema","startAt":0,"maxResults":100,"total":1,"issues":[{"expand":"operations,versionedRepresentations,editmeta,changelog,renderedFields","id":"10000","self":"https://tisimuvek.atlassian.net/rest/api/2/issue/10000","key":"IRIS-1","fields":{"timespent":43200}}]}
My problem is that this JQL will list all worklogs(aggregated) per tickets/tasks(whatever), but what I want is to only get the list of worklogs for the given user on the given day. Also, if it's possible, I would like to avoid iterating over hundreds of fields returned by the call.
Any ideas on how to do this?
Thank you guys in advance,
Kristóf Tischler
p.s: Please note that using plugins and fetching data from the DB is NOT an option
Community moderators have prevented the ability to post new answers.
Hi Tischler,
Sorry, but you have to iterate over all returned worklogs and filter them by author. There is no other way based on JIRA REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.