xl8bot
1
Originally asked by Ariel Aguilar on 20 October 2021 (original question)
Question by client:
I try to sync text field from jira to Additional comments on Service Now but the comment created as Work notes and not as Additional comments.
my script is:
if((previous.customFields.“SNOW Comments”?.value!=replica.customFields.“SNOW Comments”?.value) && replica.customFields.“SNOW Comments”?.value){
def comment = new BasicHubComment()
comment.setBody(replica.customFields.“SNOW Comments”?.value)
incident.addedComments += comment
xl8bot
2
Answer by Yael on 20 October 2021
TNX
it’s work 
xl8bot
3
Answer by Ariel Aguilar on 20 October 2021
Please try the following:
if((previous.customFields."SNOW Comments"?.value!=replica.customFields."SNOW Comments"?.value) && replica.customFields."SNOW Comments"?.value){
def comment = new BasicHubComment()
comment.setBody(replica.customFields."SNOW Comments"?.value)
comment.setInternal(false)
incident.addedComments += comment
}
Kind regards,
Ariel