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.ComponentAccessor
import org.apache.log4j.Logger
def 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
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.