1
0
-1

I have tried looking around, but cant seems to find a suitable answer.


We have Jira Cloud sending public comments to a ServiceNow instance. These comments need to be stored as internal comments on ServiceNow.


Jira Outgoing:

replica.comments       = issue.comments.findAll{!it.internal}


ServiceNow Incoming:

entity.comments            += replica.addedComments



From reading through various bits of Exalate documentation, I have tried the following on ServiceNow incoming:

entity.comments = commentHelper.mergeComments(entity, replica, {it.internal = true})


This fails to work.

Anyone got any ideas?


Cheers,

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Thank you Mathieu,


      I have done some further testing and thanks to the help of Marwan Al Jeburi found that because we are using a table other than the "incident" table, then the above won't work.

      In the end, the following was implemented on the ServiceNow Incoming configuration to get it to work with the custom table:


         entity.comments = ({ 
          cmt ->        
          def result = []        
          result.addAll(cmt)        
          result     })(entity.comments)
          entity.comments = commentHelper.mergeComments(entity, replica, {it.internal = true})


        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hello I just verified this on my instance.


        This makes all incoming comments internal worknotes in servicenow.


        if(firstSync){
            entity.tableName = "incident"
        }
        if(entity.tableName == "incident") { 
            entity.short_description = replica.summary
            entity.description = replica.description
            entity.attachments += replica.addedAttachments
            entity.comments = commentHelper.mergeComments(entity, replica, {it.internal = true})
        }

        Thank you.

        Kind regards,
        Mathieu Lepoutre

          CommentAdd your comment...