When we create a subtask for any issue, we would like to automatically add the assignee of that subtask as a watcher on the parent issue. We have ScriptRunner, JJUPIN, etc installed but I can't find a specific post-function script for what we want.
Hi Moriah,
Try adding the following SIL script post-function on the create issue transition:
if(isNotNull(parent)) {
%parent%.watchers = addElementIfNotExist(%parent%.watchers, assignee);
}
Make sure that you put the SIL post-function last in the list of post-fuctions for the create issue transition, after the issue is created.
Kind Regards,
Alex
There is no post-function to be found for such a specific action.
You have to write your own post-function as a "groovy" or "java plugin" [1].
best regards,
Marc
1 : since you are already using scriptrunner, i would go with a groovy script.
Hi,
Did the provided SIL script helped you?
Sorry, I haven't had a chance to try it yet. I am knee deep in transitioning a team but will definitely try this out over the weekend. Thank you for the quick response!
If the SIL script worked for you, please consider marking the answer as accepted.
Thanks,
Hi Moriah
I just added that postfunction to this plugin:
https://marketplace.atlassian.com/plugins/pt.lt.lfcribeiro.jira.jqlLTFunctions
Thx,
It looks like you're new here. Sign in or register to get started.