I have a project in which for a certain issue type, in his workflow, I create a Script Post-Function of type 'Create a sub-task' in his create transition.
In the configuration, I set the 'Target Issue Type' and a summary for the subtask, that's all.
When I create the parent issue, and the script runs, the subtask is not created, and this is the error message shown in the log:
2015-02-06 11:58:49,171 http-bio-8080-exec-9 WARN JPulgarinB 718x11221x2 1igg7m8 172.28.110.62,127.0.0.1 /secure/QuickCreateIssue.jspa [jira.workflow.postfunctions.CloneIssue] Could not set security level, as the schemes between the two projects are different. 2015-02-06 11:58:49,207 http-bio-8080-exec-9 ERROR JPulgarinB 718x11221x2 1igg7m8 172.28.110.62,127.0.0.1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************************************************************************************* 2015-02-06 11:58:49,210 http-bio-8080-exec-9 ERROR JPulgarinB 718x11221x2 1igg7m8 172.28.110.62,127.0.0.1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] Script function failed on issue: null, actionId: 1, file: null java.lang.NullPointerException at com.atlassian.jira.issue.customfields.impl.SelectCFType.getDefaultValue(SelectCFType.java:244) at com.atlassian.jira.issue.customfields.impl.SelectCFType.getDefaultValue(SelectCFType.java:69) at com.atlassian.jira.issue.fields.CustomFieldImpl.getDefaultValue(CustomFieldImpl.java:1248) at com.atlassian.jira.issue.IssueImpl.getCustomFieldValue(IssueImpl.java:1007) at com.atlassian.jira.issue.IssueImpl.setCustomFieldValue(IssueImpl.java:1016) at com.atlassian.jira.issue.MutableIssue$setCustomFieldValue$2.call(Unknown Source) at com.onresolve.scriptrunner.canned.jira.utils.AbstractCloneIssue$_copyCustomFieldValues_closure3.doCall(AbstractCloneIssue.groovy:141) at com.onresolve.scriptrunner.canned.jira.utils.AbstractCloneIssue.copyCustomFieldValues(AbstractCloneIssue.groovy:133) at com.onresolve.scriptrunner.canned.jira.utils.AbstractCloneIssue.doScript(AbstractCloneIssue.groovy:62) at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CreateSubTask.super$2$doScript(CreateSubTask.groovy) at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CreateSubTask.doScript(CreateSubTask.groovy:120)
Any ideas of what is happening??
By the way, when I have a parent issue and create the subtask manually, it is created without any problem.
No, that's ok, I put it after the re-index post function, this is not the first time I create a sub-task this way, actually, I did the same in other jira environments, and is working ok, the subtask is created, but in the jira instance that I'm doing it, is showing that error in the log, and the subtask in not created.
Hi Cesare, I'm not using any code at all, just the workflow post-function.
I have a project configured with some issues and subtask, and in the workflow of a parent issue, in the create transition, I just add a post function of type 'Create a sub-task', where I choose the issue type for that subtask, and give a text for the summary, that's all.
The last one, 3.0.10. But that's not the problem, as I said before, in another testing environment works ok, but in production and other testing environments, is not working, I think there's a problem with the data of those environments that makes conflict with some script runner code.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot