Confluence has been updated to version 6.15.9

JIRA SERVERJIRA CLOUD

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

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

Destination side  

Add the code to the Incoming sync 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(",")