In this example, we update the issue Summary with the list of Environments selected in an Environment Custom Field. As the custom field returns a list of Environment IDs, we use the Golive CustomFieldType to get the Environment names:

Environments added in the field "Environment(s) to book" are added in the Summary

ScriptRunner Behaviour Field setup

import com.atlassian.jira.issue.customfields.CustomFieldType

// Get the list of Environments' IDs from the Environment CF
def envField = getFieldById("customfield_10508")
List<String> envIds = envField ? (List) envField.getValue() : null

// Get the list of Environments' names from the list of IDs
CustomFieldType environmentCustomFieldType = customFieldManager.getCustomFieldType('com.holydev.env.plugin.jira-holydev-env-plugin:holydev_environment_customfield')
List envNames = envIds.collect { envId ->

// Update the Summary field with the list of Environments
getFieldByName("Summary").setFormValue("Booking " + envNames.join(", "))