1
0
-1

What is the reason for not updating my edited or deleted comments in Jira to Zendesk? In the Zendesk to Jira direction it works correctly and the code I have is the very similar on both sides.




what is the problem? 



incoming Jira side:


issue.attachments  = attachmentHelper.mergeAttachments(issue, replica)
issue.comments = commentHelper.mergeComments(issue, replica, {
    comment -> comment
    
    longString = comment.body.length()
    lastPosExSign = comment.body.lastIndexOf('!')
    if(lastPosExSign != -1) {
        lastLastPosExSign = comment.body.substring(lastPosExSign-1,lastPosExSign)
        beforeLastPosExSign = comment.body.lastIndexOf('!',longString-2);
        if(beforeLastPosExSign != -1 && lastLastPosExSign != '\\') {
            comment.body = comment.body.substring(0,beforeLastPosExSign)
        }
    }
    
    comment.body = replica.reporter.displayName + " comentó: \n\n" + comment.body + "\n"
}
)


incoming Zendesk side:


issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
issue.comments = commentHelper.mergeComments(issue, replica, {
    comment -> comment
    if (comment.internal) {
      comment.internal = true
    } else {
      comment.internal = false
    
    }

    longString = comment.body.length()
    lastPosExSign = comment.body.lastIndexOf('!')

    if(lastPosExSign != -1) {

        lastLastPosExSign = comment.body.substring(lastPosExSign-1,lastPosExSign)
        beforeLastPosExSign = comment.body.lastIndexOf('!',longString-2);
        if(beforeLastPosExSign != -1 && lastLastPosExSign != '\\') {

            comment.body = comment.body.substring(0,beforeLastPosExSign)
        }
    }
    
    comment.body = comment.author.displayName + " comentó: \n" + comment.body + "\n"
}
)


Could you help me please? could it be something about permissions in Zendesk?


Thanks

    CommentAdd your comment...