I am creating a workflow in which a subtask is created automatically in a transition using the Create a sub-task post function from Scriptrunner.
I want to use the value of a (text) custom field as the summary of the subtask.
I tried a couple of different notations like ${issue.customfield_14020}. However they result in a blank value.
Can I make this work or should I script the whole sub-task creation?
In the meantime I'm doing this in the Additional issue actions:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField;
CustomField cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_14020");
def txt = sourceIssue.getCustomFieldValue(cf)
issue.summary = "Child - ${txt}"
It works fine but I'm still interested in a solution using the Subtask Summary field only.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.