Originally asked by Jorge Guadarrama on 24 September 2021 (original question)
Hello, I have one custom ServiceNow field, that contains some choices and a Jira Custom Field of type String.
How can I set up my incoming and outgoing? I’ve programmed everything on outgoing side.
ServiceNow Outgoing
replica.customFields.“Activo del Equipo” = entity.customFields.“Prioridad Jira”
Jira Incoming
issue.customFields.“Activo del Equipo”.value = replica.customFields.“Prioridad Jira”?.value
Is this ok? Does anyone know the correct sintax? Nothing seems to happen, nor even an error.
Comments:
Ariel Aguilar commented on 24 September 2021
Hi Jorge,
You should try:
ServiceNow Outgoing:
replica.customFields."Prioridad Jira" = entity.customFields."Prioridad Jira"
Jira Incoming:
issue.customFields."Activo del Equipo".value = replica.customFields."Prioridad Jira"?.value
Let me know if this works for you now.
Kind regards,
Ariel
Jorge Guadarrama commented on 24 September 2021
Hi Ariel,
Thank you for responding. It didn’t work.
What is the difference between using
replica.customFields.“Prioridad Jira” = entity.customFields.“Prioridad Jira”
and replica.customFields.“Prioridad Jira” = entity.u_prioridad_jira ?
Can I use the column name for my custom ServiceNow field?
Is there a way to log anything?
How can I verify if my custom field is being received by Jira?
I’m asking all this questions because the documentations is a bit incomplete.
Thanks
Jorge Guadarrama commented on 24 September 2021
This is my outgoing:
if (entity.tableName == "incident" && entity.assignment_group.display_value == 'Grupo 1') {
replica.key = entity.key
replica.summary = entity.short_description
replica.description = entity.description
replica.attachments = entity.attachments
replica.comments = entity.comments
replica.issuetype = 'Incident'
replica.customFields."Prioridad Jira" = entity.customFields."Prioridad Jira"
}