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 vote
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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted 3 hours ago in Confluence

Calling all marketing teams who use Confluence - we want to hear from you!

Hi Community! me again 🙂 If you’re a marketing team using Confluence, we want to hear your story! How did you start using Confluence? What are your use cases? What have been some of the benefits?...

24 views 0 2
Join discussion

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