Why is customfields{} empty in remote entity even if field on workItem is populated?

Originally asked by Jónheiður Ísleifsdóttir on 16 February 2022 (original question)


I have the following field on ADO side by using:
replica.customFields.“Fix Version” = workItem.customKeys.“Fix Version”

but I still get error on Jira cloud side using:
issue.customFields.“Resolved in”.value = replica.customFields.“Fix Version”.value

I get the error: Cannot get property ‘value’ on null object at

and when I use

issue.customFields.“Resolved in”.value = replica.customFields.“Fix Version”?.value

it runs but I still get no data.

So I checked the remote entity and local payload in the queues and customfields is empty. What can be the reason that this is not working? Am I not referencing the name of the field correctly. This is just a text field I added to my process in ADO.

Best regards, Jónheiður


Answer by Harold Oconitrillo on 16 February 2022

Hi Jónheiður Ísleifsdóttir,

Please implement the below scripts and let me know the outcome.

Outgoing for Azure

replica.customKeys."Custom key Fix Version" = workItem.customKeys."Custom.FixVersion"
replica.customFields."Custom field Fix Version" = workItem.customFields."Fix Version" 

Incoming Jira Cloud or other

issue.customFields."Fix Version".value = replica.customFields."Custom field Fix Version"?.value
issue.customFields."Fix Version".value = replica.customFields."Custom key Fix Version"?.value 
  

Thanks,

Harold Cruz