1
0
-1

Hi,


I'm trying to get the author of Jira's comment and comment to Service Now.


I used the script below for incidents and it worked, but for requests the error occurs: No such property: issue for class: Script485

//Comments
entity.comments = commentHelper.mergeComments(issue, replica,                      
                    {
                       comment ->
                       comment.body =
                          "[" + comment.author.displayName +
                                  "  | email: " + comment.author.email + "]" +
                                  " comentou: \n" +
                          comment.body + "\n" 
                    }
)


How to Synchronize comments with author in RITM (Request Item) on ServiceNow?


    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Samanta Peixoto 


      You can check this doc: https://docs.exalate.com/docs/how-to-sync-comments-in-servicenow


      Also, you can try something like this first: 



      requestItem.comments += replica.addedComments
      
      requestItem.comments += commentHelper.mergeComments(issue, replica,
      {
      comment ->
      comment.body =
      "[" + comment.author.displayName +
      " | email: " + comment.author.email + "]" +
      " comentou: \n" +
      comment.body + "\n"
      }
      )



      I hope you will find the shared information useful. 

      BR, 

      Jillani

        CommentAdd your comment...