Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
config.jpg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which version of Script Runner do you have?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem seems to be related to one of the select/multiselect/radio/checkbox fields on the parent issue, that is also on the child issue. Are there any like this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
we tried to reproduce this actually... can you try in a different workflow/project or something so we can rule things out?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
or you can create an issue at https://jamieechlin.atlassian.net/browse/GRV and get us a backup of your db if you're desperate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did those tests some days ago, I just created a new project for this, just with summary assignee and description, same for the child, and the problem was the same, that's the reason I asked you :) , cause that was very strange
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please add some details about the code you are using to create the subtask?
It seems that you have a null parent issue when you are going to create the subtask.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.