List to text box (null value?

Originally asked by Filip Š. on 22 October 2021 (original question)


Hello,

I have custom field “Topic” that is type of Single Choice on Jira Server side, and would like to sync it to custom field “Topic” that is type text on Jira Cloud side.

I have find this https://support.idalko.com/servicedesk/customer/kb/view/2883643 but when I Apply it on receiving end, i get an Null error because sometimes that field can be null. Can you please provide me with a code snipet on the incoming side that would make this possible, I have tried several things but i always get an error.

Thanks


Answer by Ariel Aguilar on 22 October 2021

Hi Filip,

In order to prevent null values from generating an error, you might want to escape using “?”.

Example Incoming Script:

issue.customFields."TEXT".value = replica.customFields."Sports List"?.value?.value


Let me know if this works for you,

Kind regards,

Ariel


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.