I am creating subtask at a workflow postfunction using scriptrunner create subtask postfunction
In my project there is a default assignee and the subtask is getting that instead of the parent s.
How can I force to set the subtask s assignee to that of the parent s?
Thanks in advance.
Are you sure it's not the workflow of the subtask which set the assignee? All fields of the parent are cloned to the subtask including the assignee.
There was a misunderstanding on my part, you are right, the assignee is copied from the parent.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you moved your post function after the Reindex step?
I thought Henning's answer was right when reading but when I checked my post function I set it too. Here is what I have:
issue.assignee == transientVars["issue"].assignee;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried adding something like this in your scriptrunner postfunction:
subtask.setAssignee(issue.getAssignee()); subtask.store();
Where subtask is the Issue object of the newly created subtask, and issue is the object of the parent issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.