Hi Syed Majid Hassan it worked now, the only thing I did is instead of numeric values of the field in Incoming and outgoing, I replace everything with actual text and it worked.
Outgoing- Zendesk
replica.customFields.“Is this blocking an active or impending study visit?” = issue.customFields.“Is this blocking an active or impending study visit?” //Is this blocking an activity?
Incoming -Jira
//Is this blocking an activity?
def blockMap = [“yes_bug_blocking_study”:“Yes”, “no_bug_not_blocking_study”:“No”]
issue.customFields.“Is this blocking an active or impending study visit?”.value = nodeHelper.getOption(issue, “Is this blocking an active or impending study visit?”, blockMap[replica.customFields.“Is this blocking an active or impending study visit?”?.value?.value])
I use the same code, now the Error is gone, but the field is not populating in Jira
Comments:
Syed Majid Hassan commented on 11 June 2023
Unfortunately, it is not possible to troubleshoot this here. Can you please check the remote replica to ensure that the expected data is arriving from the other side? If it is, can you please try to hard code a value in the Incoming script and try to go backwards from there to work out where the config is failing?
From my above mention Scenarios, 1st one works fine, but 2nd is not
When I use the below code, I am getting Error.
Outgoing from Zendesk :
Incoming in Jira:
def blockMap = [“yes_bug_blocking_study”:“Yes”, “no_bug_not_blocking_study”:“No”] if (replica.customFields.“13637516636557”?.value?.size()>0) //line 40
issue.customFields.“12388”.value = nodeHelper.getOption(issue, “Is this blocking an active or impending study visit?”, blockMap[replica.customFields.“13637516636557”?.value[0]?.value])