I have been testing JIRAs abilities to add pages on Confluence using this guide:
https://scriptrunner.adaptavist.com/latest/jira/interacting-with-confluence-from-jira.html
My content for the body of the page is taken from a custom field which is rendered in wiki style.
The first part the guide uses wiki as representation:
body : [
storage: [
value : pageBody,
representation: "wiki"
],
],
But when the guide makes the XML to add the link back to the JIRA ticket then the representation is changed to storage:
body : [
storage: [
value : writer.toString(),
representation: "storage"
]
]
When the Confluence page is created the link back is created as it should, but my text from the custom field is just placed as a single line, not even line breakers are added.
How do I make the link back to the issue and make the body text format correct as it is in the wiki-style custom field?