Add comment without syncing

Originally asked by Shir Goldberg on 30 October 2020 (original question)


We’re syncing issues between Jira Cloud and GitHub. There are some comments we want to have Exalate add on one side and not sync back to the other.

The commentHelper.addComment documentation says the method signature is:

addComment(String body, Boolean sync, List comments )

And then says that (somewhat confusingly) setting sync to true will not sync the comment. However, whether or not we set sync to true, false, or don’t set it at all, the comment always syncs. For example, all 3 of these lines have identical behavior—they add a new comment and sync it back:

issue.comments = commentHelper.addComment("Assigned to " + assignee.displayName, true, issue.comments)  
issue.comments = commentHelper.addComment("Assigned to " + assignee.displayName, false, issue.comments)  
issue.comments = commentHelper.addComment("Assigned to " + assignee.displayName, issue.comments)

Answer by Paul Schmidt on 20 June 2022

This bug seems to be still present for self-hosted Jira Service Management instances


Answer by Juan Grases on 01 November 2020

Hi!

Actually the second option you tried should work, but we have identified we have a bug and it’s currently not working. We will be working on a fix and we will let you know once it’s deployed.

Sorry for the inconvenience,

Juan