Hello,
I am trying to get the description of an issue from JIRA to put it in a Confluence Storage Format template in order to create a page in Confluence. But I could't find a way to render the description raw data to a storage format recognizable format. Here is a concrete example :
For an issue in JIRA with following description :
image2016-6-1 15:4:31.png
The description string I get by calling com.atlassian.jira.issue.Issue.getDescription() is :
{color:#14892c}Recently Updated{color} h1. *_As you and your team create content this area will fill up and display the latest updates._*
If I don't make it wrong, the string I got is its wiki template representation. Insert it directly in Storage format will not be recognized by the template engine so will not be properly rendered.
I have tried using <ac:rich-text-body> to enclose the string but it doesn't work. Seems to I have to convert the wiki representation to HTML, or XHTML. How can I achieve this in Java code?
Thanks
Community moderators have prevented the ability to post new answers.
Confluence has a function to render wiki markup format:
But the problem is that Confluence wiki markup is slightly different from JIRA wiki markup. For example, the {color section of the wiki markup will try to render a Confluence macro called "color", which doesn't exist (although one option would be to write this macro, or to replace this macro in an intermediate step in your code before rendering the rest of the markup).
Another option would be to render the markup in JIRA first (since I assume you are getting the content directly from JIRA) and then simply put that in the code for the page (since the page code is basically html anyways).
https://answers.atlassian.com/questions/282947
There's no real easy answer for this... Another option might even be to call the wikirenderer via REST. Perhaps there is also some way on the backend using the Application Links whereby the rendered text can be inserted into Confluence
Sorry that it's not a definitive answer, but at least maybe it gives you a few ideas.
Below link is not opening?
where is the documents.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's an updated version, seems like it moved to a new package:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.