Confluence has been updated to version 6.15.9

Back to  commentHelper


mergeComments(IHubIssue issue,IHubIssue replica, Closure commentChangeFn)

Allows formatting the comment when merging remote comments. Use a closure to define how the merged comment body should be formatted.

Introduced in0.10

Example use

  • Add custom formatting

// provide a custom format of the comment during update/create of comments
issue.comments     = commentHelper.mergeComments(issue, replica,
                       comment ->
                       comment.body =
                          "[" + + 
                                  "| mailto:" + + "]" +
                                  " commented: \n" +
                          "{quote}\n" +
                          comment.body + ";\n" +

  • Use the script to impersonate the comment

// set the real comment author for all comments;  if the author is null set a default user
issue.comments = commentHelper.mergeComments(issue, replica) {
	if ( it.executor = 
	else it.executor = nodeHelper.getUserByEmail("default user email"); it


  • Any field available in the Comment object can be used to format the comment.

See Also

Back to  commentHelper