I already use the CommentManager to delete comments:
for(Comment comment : comments){
commentManager.delete(comment, false, user);
}
Documentation of the CommentManager:
dispatchEvent - if true then an event of type EventType.ISSUE_COMMENT_DELETED_ID will be dispatched and any notifications listening for that event will be triggered. If false no event will be dispatched. Together with IssueEvent CommentDeletedEvent
I pass false to not trigger the Event. I also replaced the IssueService with the IssueManager:
issue.setSummary(newSummary)
issue.setDescription(newDesc)
issueManager.updateIssue(user, issue, EventDispatchOption.DO_NOT_DISPATCH, false)
Still not working. When running the script, a few hundred mails will be sended. I wonder if any Atlassian employee can answer this simple question…I created this topic almost 2 weeks ago.