Hello,
i try to create a "constrained issue" (https://scriptrunner.adaptavist.com/5.2.0/jira/fragments/CreateConstrainedIssue.html) button for creating a new issue based on the current issue.
I get all fields that i need expect a single custom field value (single line text).
Here is the complete behaviours script:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.fields.CustomField
import static com.atlassian.jira.issue.IssueFieldConstants.*
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
ComponentManager componentManager = ComponentManager.getInstance()
def issueManager = ComponentAccessor.getIssueManager()
//Check to make sure this is the correct context for the behaviour.
if (getBehaviourContextId() == "create-document") {
//Set the project and issuetype to be readonly so the user cannot alter these.
getFieldById("project-field").setReadOnly(true)
getFieldById("issuetype-field").setReadOnly(true)
//Find the details of the Issue from which the request to link was made
def contextIssue = issueManager.getIssueObject(getContextIssueId())
def customFieldManager = ComponentAccessor.getCustomFieldManager()
//Pre-populate the Summary, issue link and issue link type, security level and reporter.
getFieldById("summary").setFormValue("Document Request created from ${contextIssue.reporter.displayName}").setReadOnly(false)
getFieldById(REPORTER).setFormValue("${contextIssue.reporterId}").setReadOnly(true)
getFieldById("security").setFormValue("${contextIssue.securityLevelId}").setReadOnly(true)
getFieldById("issuelinks-linktype").setFormValue("was split from").setReadOnly(true)
getFieldById("issuelinks-issues").setFormValue("${contextIssue.key}").setReadOnly(true)
// Hard Coded values work but i need the value from the current issue. In this case it's a single line text field
getFieldById("customfield_13206").setFormValue("Some hard coded textthat i want read from customfield_13206").setReadOnly(true)
}
Here is the line that i want to make more dynamic 
getFieldById("customfield_13206").setFormValue("Some hard coded textthat i want read from customfield_13206").setReadOnly(true)Thanks for your help.
Regards,
Tim