Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I can get last 10 or 20 worklog for a Issue using REST API

Raju Mazumder March 9, 2017

Hello there,

I want to filter worklog using Date. But I came to know there is no support to filter worklog.

Now I am using this API 

rest/api/2/issue/{jira-key}/worklog

But this API don't have support to add additional parameter.

 

Also try this API

/rest/api/latest/search?jql=key="jira-key"  order by created desc &maxResults=10&fields=worklog

It is also not working.

 

Can anyone have any workaround to do this?

 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Raju Mazumder March 9, 2017

Hi Voldymyr,

Thanks for your reply. Yes, I know I can do that. But it is not a good solution based on performance. Our customer can have 600+ worklog per issue. So it would not be good idea to do that.

0 votes
Volodymyr Krupach
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.
March 9, 2017

Hi Raju,

The only way is to use rest/api/2/issue/{jira-key}/worklog and then loop through array of worklogs. For now this REST point does not support paging and returns all worklogs at once.

TAGS
AUG Leaders

Atlassian Community Events