How to Sync Organizations Field Values from Jira Service Desk to a Text Custom Field in Jira

    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(",")