Aadjust the synchronization rules so that tables and embedded images are displayed correctly in comments

I have configured Exalate between Jira Cloud and Jira Datacenter. It works correctly, but when synchronizing comments from Cloud to Datacenter, if the original comment contains a table, it does not appear correctly formatted in the synchronization. Similarly, if there is an embedded image in the original comment, it does not appear in the synchronized comment and is copied to the attachments of the synchronized issue.

Translated with DeepL.com (free version)

When synchronizing comments between Jira Cloud and Jira Datacenter using Exalate, formatting issues with tables and embedded images are common due to differences in how Jira Cloud (which uses Atlassian Document Format, or ADF) and Jira Datacenter (which uses wiki markup) handle comment content.

Tables:
Tables created in Jira Cloud may not render correctly in Jira Datacenter because the formats are not directly compatible. To improve table rendering, you can use a script in your sync rules to convert ADF tables to wiki markup before sending them to Jira Datacenter. This typically requires custom Groovy scripting in your sync rules.

Embedded Images:
Embedded images in Jira Cloud comments are usually added as attachments in Jira Datacenter, but the image itself may not appear inline in the comment. This is because Jira Datacenter expects images to be referenced using wiki markup (e.g., !image.png!). You can enhance your sync rules to detect image attachments and insert the appropriate wiki markup into the comment body.

How to Adjust Your Sync Rules:

  • On the outgoing (Jira Cloud) side, process the comment body to convert tables and images to a format Jira Datacenter understands.
  • On the incoming (Jira Datacenter) side, ensure the comment body uses wiki markup for tables and images.

You can use the commentHelper methods in your sync scripts to manipulate and format comments as needed. For example, you can use a custom function to replace ADF table syntax with wiki markup, and to insert image references for attachments.

For more details and code examples on formatting and synchronizing comments, see the Exalate documentation:

If you need help with specific Groovy scripts for this transformation, let me know the exact formats you want to convert, and I can provide a code example!

Hi @angel.blanco

Can you please update us whether the response provided by @Aida helped you or not? Do you want us to look this further?

Thanks,

Sonal