Convert remote status changes as public comment

Originally asked by Adriano Mazi on 19 November 2020 (original question)


I’ve followed this page and it’s working fine, but the comments on Jira Service Desk are being posted as internal. How can I change this setting to post the status changes as public?

https://docs.idalko.com/exalate/display/ED/Converting+remote+status+changes+to+local+comments+in+Exalate+for+Jira+Cloud


Answer by Juan Grases on 19 November 2020

Hi, could you try this?

if (!replica.status.equals(previous?.status)) {
  // construct the comment
  String message = "${replica.key}: Status updated from '${previous?.status?.name}' to '${replica?.status?.name}'"
  issue.comments = commentHelper.addComment(issue.comments){ comment ->
     comment.body = message
     comment.restrictSync = true
     comment.internal = false
  }
}

Best regards,

Juan


Comments:

Adriano Mazi commented on 19 November 2020

Juan, it worked. Also, is it possible to prevent this comments being synced back to original ticket where I transitioned the status:

Juan Grases commented on 19 November 2020

Normally that’s what

comment.restrictSync = true
Is doing. It’s not working? Is this on Jira Cloud?

Adriano Mazi commented on 19 November 2020

Juan, it’s working fine. I have another configuration to transition the tickets and add a comment, but didn’t edit this section.

Thank you for the support.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.