I have a two-way sync enabled via the "Script" mode and I am successful in passing all fields except one: the DevOps Work Item key back to Jira

Originally asked by Rosie Dias on 26 May 2021 (original question)


Hi
I have a two-way sync enabled via the “Script” mode and I am successful in passing all fields except one: the DevOps Work Item key back to Jira. Some details below and also zip file attached:

Incoming Server:
issue.customFields.“DevOpsWorkItem”?.value = replica.key

Outgoing Server:
replica.customFields.“DevOpsWorkItem” = workItem.Key

I get no errors now but the field is not passed from DevOps to Jira.


Answer by Ariel Aguilar on 26 May 2021

Hi Rosie,

As long as you have the following on the Azure Outgoing Script:

replica.key = workItem.key

Then, on the Jira Incoming script:

issue.customFields."DevOpsWorkItem".value = replica.key

Let me know if this works for you,

Kind regards,

Ariel