This article describes how to synchronize comments between Xurrent and other systems.
Outgoing sync (Xurrent → Remote system)
To send comments from Xurrent to the remote system, use this script in your Outgoing Sync:
replica.comments = entity.commentsTo send comments from Xurrent to the remote system while maintaining formatting, use this script in your Outgoing Sync:
1. When remote system is using Wiki e.g. Jira
replica.comments = entity.comments.each {
if (it.body) {
it.body = nodeHelper.convertXurrentToWiki(it.body)
}
} 2. When remote system is using HTML e.g. ADO
replica.comments = entity.comments.each {
if (it.body) {
it.body = nodeHelper.convertXurrentToHTML(it.body)
}
} Incoming sync (Remote system → Xurrent)
To receive comments from the remote system and add them to Xurrent, use this script in your Incoming Sync:
entity.comments = commentHelper.mergeComments(entity, replica)mergeComments helper merges new comments with existing ones, avoiding duplicates while preserving comment history.To receive comments from the remote system and add them to Xurrent while maintaining formatting, use this script in your Outgoing Sync:
1. When remote system is using Wiki e.g. Jira
issue.comments = commentHelper.mergeComments(issue, replica,
{
comment ->
comment.body = nodeHelper.convertWikiToXurrent(comment.body)
})2. When remote system is using HTML e.g. ADO
issue.comments = commentHelper.mergeComments(issue, replica,
{
comment ->
comment.body = nodeHelper.convertHtmlToXurrent(comment.body)
})More information
- How to Sync Rich Text and HTML Between Xurrent and Other Systems
- How to Sync Attachments in Xurrent
- How to Sync Requests in Xurrent
Have more questions? Ask the community