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)