How to Sync Service Management Fields in Jira On-premise

    This article shows how to synchronize an Organizations field in Jira Cloud Service Management.

    The Organizations field is a Jira Service management field, it's a single select drop-down list. For more information, please read the Jira Service management documentation.

    Source Side

    Outgoing sync

    replica.customFields."Organizations" = issue.customFields."Organizations"

    Destination Side

    Incoming sync 

    To set the received Organizations field value on the receiving side use this code:

    issue.customFields.Organizations?.value = issue.customFields.Organizations.value?.collect { org -> org?.organizationName }?.findAll()

    To set the value in your local Organizations field manually use this code:

    issue.customFields.Organizations.value = "Organization Name"

    To set multiple values in your local Organizations field manually use this code:

    issue.customFields.Organizations.value = ["Organization Name1", "Organization Name2"]