Jira REST: get rendered worklog comments for comments 21+ Edited

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

0 votes
Warren Levy Community Champion Nov 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": [

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

i just raised a suggestion

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

you're welcome to vote

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

132 views 6 8
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you