I am trying to use Post Function in my workflow to to automatically create a subtask when an issue gets created. However, I'd like to set different assignees for both Parent task and Subtask, It appears that Post Function is forcing the assignee of the subtask to mimic that of the parent task.
For a variety of reasons I am not using Component in my Issue Creation screen but rather use a Custom Field that mimics Component.
Here is what the sequence of Post Function and any custom script looks like. Below is the exact copy of what I see in my workflow Post Function.
Step 7 uses the following code:
issue.summary = (issue.summary) issue.assigneeId = 'username@email.com'
It is worth noting that Step 7 on its own executes fine and assigns the subtask to the proper user. It is when I try to assign the parent task, that subtask will inherit assignee from the parent task.
Any suggestion is welcome and appreciated!
Hi @Jamie Echlin [Adaptavist]
But in the documentation here https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Clonesanissueandlinks for cloning it is mentioned that and I quote:
"If you want to override some of the field values rather than have them inherited from the source issue you can specify that in the Additional Code field"
Is it not possible to override the subtask assignee in Additional Code field?
I appreciate your response.
Thanks
I am using a Custom Field to mimic Component but with a different name. Line 1 essentially copies the value from the custom field into the component. Component has a Lead associated with it. So when ticket gets assigned through Line 2, it will get assigned to the proper owner.
I am having an issue getting the custom script post function executing. My systems set up tells me that ScriptRunner is enabled but for the life of me I cannot get the custom post function to do anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can't do that in a listener, you need to do a proper edit if you want to change values after the transaction has already been committed.
You should just a standard script post-function, place it towards the top of the list of post functions, and that should work. Although I don't know what line 1 is supposed to do.
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.