Missed Team ’24? Catch up on announcements here.

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

How can I get the rendered HTML of a wiki markup field in JIRA?

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2013

I'm building some remote scripts to retrieve information from JIRA and manipulate it before reflecting that information over in another system - for fields in JIRA that are wiki-markup based, I'd like to be able to show the rendered HTML of those fields, rather than the raw markup.

Does JIRA provide any way for an external script to convert a wiki field into rendered HTML? Confluence, for example, provides a "render" method over SOAP & XML-RPC to accomplish this.

3 answers

2 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
c
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 7, 2013

When fetching an issue, add a query parameter

expand=renderedFields

to use expansion, like in

https://example.org/jira/rest/api/2/issue/FOO-1?expand=renderedFields

The JSON will then contain

{
  expand: "renderedFields,...",
  id: "38096",
  self: https://example.org/jira/rest/api/2/issue/38096,
  key: "FOO-1",
  fields: {...},
  renderedFields: {...}
}

The rendered HTML is in `renderedFields`.

1 vote
Answer accepted
Yves Martin
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.
May 29, 2013

With JIRA REST API you can query for issue fields rendered as HTML thanks to expansion.

Expansion is described in API introduction: https://docs.atlassian.com/jira/REST/5.2.11/

and it can be used when getting an issue: https://docs.atlassian.com/jira/REST/5.2.11/#id109110

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 6, 2013

Thanks! I'm not sure how I missed that :-)

Mike Howells August 7, 2013

I'm using the REST "search" resource with expand=renderedFields and I'm getting back issues with a renderedFields attribute but it's always empty.

0 votes
Renjith Pillai
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.
June 6, 2013

Also with the direct XML output of the JIRA issue or the filter, one of the elements is the HTML rendered content.

TAGS
AUG Leaders

Atlassian Community Events