The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira REST: get rendered worklog comments for comments 21+

Jens Kisters __SeibertSolutions
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 Champions.
November 28, 2017

Hello,

in our addon we used this rest call to get an issues worklogs rendered as HTML:

/rest/api/2/issue/10806?expand=renderedFields

The catch here is that this call never returns more than 20 worklogs and i also could't find a way to access the worklogs using pagination (The call does not react to a startAt parameter and the docs don't mention pagination).

When i use 

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue/{issueIdOrKey}/worklog-getIssueWorklog

to bypass this limitation the call does not offer the option to expand rendered fields.

The addon comes for server and cloud and i am wondering

- is there a way to get the rendered worklogs for cloud at all

- is there a way that works for server too without having to write a own rest service for this

 

thanks in advance

Jens

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Jens Kisters __SeibertSolutions
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 Champions.
November 28, 2017

i just raised a suggestion

https://jira.atlassian.com/browse/JRASERVER-66410 

you're welcome to vote

0 votes
Warren
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 Champions.
November 28, 2017

Hi Jens

We're on the cloud version. I use 

/rest/agile/1.0/sprint/123/issue?fields=key,worklog

which gets all the worklogs for all issues in a sprint. As you say, this is restricted to 20 worklogs.

If there are more than 20 worklogs (fields.worklog.total > 20) then I use

/rest/api/2/issue/ABC-456/worklog

which gets the worklogs for a specific issue and returns them ALL - see the JSON below

{{
"startAt": 0,
"maxResults": 23,
"total": 23,
"worklogs": [
Jens Kisters __SeibertSolutions
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 Champions.
November 28, 2017

Hi Warren,

i am looking for a way to get the worklog comments as HTML, not in the wikirenderer source format.

Example:

<b>bold</b> instead ob *bold*

Cheers

Jens

TAGS
AUG Leaders

Atlassian Community Events