The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe

How to sync Jira comment into ServiceNow work_notes field

 
2
1
0

I only want to sync Jira comment into ServiceNow work_notes field.


ServiceNow Incoming rule added:

entity.work_notes += replica.addedComments

 but I am getting the below error:


    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi HA


      Please DO NOT use following construct 


      entity.work_notes += replica.addedComments


      The way ServiceNow works is that updating entity.work_notes will result in a single new work_note containing the provided content.  Because the original entity.work_notes (which is provided to the incoming sync) contains all the work notes of the entity, the statement above will effectively duplicate the work_notes.  

      You can imagine the consequence if you sync this a couple of times. 




      The proper way to add work notes is by setting the flag 'internal' to true

      entity.comments += replica.addedComments.collect { 
      					it.internal = true
      					it
      }
      
      



      Give it a try

      1. HA

        Thanks Francis. This worked perfectly.

      CommentAdd your comment...