This article shows how to sync Organizations field values from Jira Service Desk to a text custom field in Jira Software. 

Source side

Add the code below to the Outgoing sync(Data Filter) 

 // ORGANIZATIONS SYNC
replica.customKeys."Organization Names" = issue.customFields."Organizations".value?.collect { org -> org?.name }?.findAll()
// END: ORGANIZATIONS SYNC
 


 

Destination side  

Add the code to the Incoming sync: Create and Change processors to add the received Organization names into the text custom field.

Please replace the custom field name with your custom field name in the code below.

//add organization names into the "My Text Field"
 issue.customFields."My Text Field".value = replica.customKeys."Organization Names"?.join(",")