Hi all,
I'm using the Post Function "Create Subtask (Scriptrunner)" to create a new subtask; but I need a way to copy a user picker value from a customfield within the parent ticket into the "Assignee" field within the subtask.
I'm trying to use the "Additonal Issue Actions" section to copy a user selected within "Field A" (customfield - User picker) into the "Assignee" field within the subtask.
So far I have this code:
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
def customFieldManager = ComponentAccessor.customFieldManager
def assigneeField = customFieldManager.getCustomFieldObjectsByName('Flowchart Assignee')
def parentIssue = issue.parentObject
issue.setAssignee(assigneeField, parentIssue.getCustomFieldValue(assigneeField))
issue.summary = issue.summary + " - Flowchart Task"
But I can't get it to work. Any help would be greatly appreciated.
Thanks,
Mike