extractig worklog for a period

Jérôme Janvier November 15, 2017

Hi.

I'm trying to export the time spent by my team in a given period. (the current day in the following exemple)

I found something using the rest api but the result is hardly usable in excel :

https://jira.netgroupesni.fr/jira/rest/api/2/search?jql=category%20=%20%22DDLD%20TMA%22%20and%20worklogDate%3E=startOfDay()&fields=worklog

 

Is there any other way to get this informations, or may be can ai personalize de fields I get in the rest api?

I juset need  user, key of the ticket and time spent

 

Thank you

 

4 answers

0 votes
Jérôme Janvier November 15, 2017

the "timespent" column is not possible, it sums all the time spent, even if ihe tilme was spent in the previous period.

0 votes
Jérôme Janvier November 15, 2017

I tried it (in the ticket browser) bud I could not find the way of extracting worklogs.

(I'm quite new in using JIRA)

Alexey Matveev
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.
November 15, 2017

Your rest call will return the same information. If you do not want to write a program then you could use, for example, Easybi plugin to get the information you need.

0 votes
Alexey Matveev
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.
November 15, 2017

Hello,

Why you can not write such a filter and export it to csv format?

Alexey Matveev
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.
November 15, 2017

Go to issues->search and choose advanced. Enter the same JQL as you entered in your REST call. Then add column timespent. Then use button Export and choose csv. You will get the csv file with timespent column. You can import the file into Excel.

Read more about adding columns here

https://confluence.atlassian.com/adminjiraserver072/configuring-the-default-issue-navigator-829827009.html

And read more about export here

https://confluence.atlassian.com/jiracoreserver073/working-with-search-results-861257284.html

0 votes
Jérôme Janvier November 15, 2017

to precise the question, here is an exempla of the answer when asking the previous URL : (only the first result)

{
"expand":"schema,names",
"startAt":0,
"maxResults":50,
"total":19,
"issues":[{
"expand":"operations,versionedRepresentations,editmeta,changelog,renderedFields",
"id":"45025",
"self":"https://jira.netgroupesni.fr/jira/rest/api/2/issue/45025",
"key":"QS0075-16",
"fields":{
"worklog":{
"startAt":0,
"maxResults":20,
"total":1,
"worklogs":[{
"self":"https://jira.netgroupesni.fr/jira/rest/api/2/issue/45025/worklog/40700",
"author":{
"self":"https://jira.netgroupesni.fr/jira/rest/api/2/user?username=BD",
"name":"BD",
"key":"bd",
"emailAddress":
"bruno.d@b.com",
"avatarUrls":{
"48x48":"https://jira.netgroupesni.fr/jira/secure/useravatar?ownerId=bdumeny&avatarId=14400",
"24x24":"https://jira.netgroupesni.fr/jira/secure/useravatar?size=small&ownerId=bdumeny&avatarId=14400",
"16x16":"https://jira.netgroupesni.fr/jira/secure/useravatar?size=xsmall&ownerId=bdumeny&avatarId=14400",
"32x32":"https://jira.netgroupesni.fr/jira/secure/useravatar?size=medium&ownerId=bdumeny&avatarId=14400"
},
"displayName":"D Bruno",
"active":true,
"timeZone":"Europe/Paris"
},
"updateAuthor":{
"self":"https://jira.netgroupesni.fr/jira/rest/api/2/user?username=BDUMENY",
"name": "BD",
"key":"bd",
"emailAddress":"bruno.d@b.com",
"avatarUrls":{
"48x48":"https://jira.netgroupesni.fr/jira/secure/useravatar?ownerId=bdumeny&avatarId=14400",
"24x24":"https://jira.netgroupesni.fr/jira/secure/useravatar?size=small&ownerId=bdumeny&avatarId=14400",
"16x16":"https://jira.netgroupesni.fr/jira/secure/useravatar?size=xsmall&ownerId=bdumeny&avatarId=14400",
"32x32":"https://jira.netgroupesni.fr/jira/secure/useravatar?size=medium&ownerId=bdumeny&avatarId=14400"
},
"displayName":"D Bruno",
"active":true,
"timeZone":"Europe/Paris"
},
"created":"2017-11-15T08:35:55.000+0100",
"updated":"2017-11-15T08:35:55.000+0100",
"started":"2017-11-15T08:35:00.000+0100",
"timeSpent":"3h",
"timeSpentSeconds":10800,
"id":"40700",
"issueId":"45025"
}]
}
}
},{

Suggest an answer

Log in or Sign up to answer