Hi,
How can I set a rule to add Reporter of main task as a watcher for sub-tasks?
I used the workflow post function on sub-task creation:
The field Watchers will take the value from Reporter. Source issue is the parent, destination the sub-task.
I hope will work as expected.
Hi Sam,
the following code will do the required task, every time a sub-task created
add the following script a custom post function script @ issue creation
import com.atlassian.jira.component.ComponentAccessorimport org.apache.log4j.Loggerdef watcherManager = ComponentAccessor.getWatcherManager()def user = issue.getParentObject().getReporter()if (issue.getParentObject() != null){ watcherManager.startWatching(user,issue)}log.error(issue)log.error(user)
Note: Your post function must be last in the list to the
Thanks
Muhammet Adel
It looks like you're new here. Sign in or register to get started.