I'm using the Create a sub-task scriptrunner post function. The only way that I can get it to work is if I set "Fields to copy" to All.
Setting it to None or even Custom causes the post function to fail with the following error in the Logs:
2020-07-27 17:12:49,389 ERROR [workflow.ScriptWorkflowFunction]: ************************************************************************************* 2020-07-27 17:12:49,389 ERROR [workflow.ScriptWorkflowFunction]: Script function failed on issue: XXX-3143, actionId: 11, file: null java.lang.IllegalArgumentException: Sub-Task Issue cannot be null. at com.atlassian.jira.config.DefaultSubTaskManager.createSubTaskIssueLink(DefaultSubTaskManager.java:414) at com.atlassian.jira.config.SubTaskManager$createSubTaskIssueLink.call(Unknown Source) at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CreateSubTask.doScript(CreateSubTask.groovy:150)
My condition basically searches a multi select field for a specific example:
cfValues["Discipline"]*.value.contains("Concept")
I have the Target Issue Type set to Sub-task.
I have a simple additional issue action to append the name of the discipline to the end of the existing summary:
issue.summary = issue.summary + " Concept"
The only way I can get it to work is to specify that All fields get copied over instead of 'None' or 'Custom'. This creates a lot of bloat and requires cleanup after creation.
Updated Scriptrunner to 6.5.0 and it addressed the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.