How can I add an assignee to the watchers list automatically?

When my users are assigned issues, they are not added to the watchers list automatically and therefore miss some of the dialog that goes on. How can I automatically have someone added to the watch list when they are assigned?

7 answers

1 accepted

0 votes

Assignees should be automatically notified without having to be a watcher - maybe your notification scheme isn't set up properly?

Made plenty of sense...looks like my scheme wasn't applied to all projects. Thank you!

The "Answer" does not answer the question. How do I automatically add a new assignee to the watchers?

Seeing that Atlassian doesn't want to add the feature to Add Watchers with a Post Function, I created a workaround.  Our company uses the Cloud (onDemand) instance as well.

First, I created a field named "Watchers" which is a User Picker (multiple users).  Then, in my Workflows, I added the Post Function "Copy Value From Field to Field Function" to copy Assignee of each step to the Watchers Field in each step.

 Snip20151119_11.png

I tested this and it works perfectly.  Depending on your setup, you may have to edit Notifications and Permissions accordingly – e.g. I send updates to my Watchers with the Notification Scheme and I allow Watchers to Comment on the Issues but not Transition the Issues.

I hope this help finally answer this question. 

If someone is assigned to a task, then they automatically get notified of activity, but these settings are controlled within the notification schemes that are setup. In short, as long as your notificaiton scheme is set to the default, then all assignees of a task should already be treated as watchers.

Again, it is not answering the question!!

If you assign the ticket as assignee to a third person. You will never get notified about the ticket after assigning.

You can call below script on issue update event. Using this, all the privious assignees will get added to the watchers. I'm not sure if you are looking specifially for this.

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.event.issue.AbstractIssueEventListener
import com.atlassian.jira.event.issue.IssueEvent
import com.atlassian.jira.issue.Issue
import org.apache.log4j.Logger
import com.atlassian.jira.ComponentManager
import static org.apache.log4j.Level.DEBUG

class AddReporterAsWatcher extends AbstractIssueEventListener {
    Logger log = Logger.getLogger(AddReporterAsWatcher.class)
    def watcherManager = ComponentAccessor.getWatcherManager()
    def userManager = ComponentAccessor.getUserManager()

    @Override
    void workflowEvent(IssueEvent event) {
        Issue issue = event.getIssue();
        log.setLevel(DEBUG)
        log.debug "Event: ${event.getEventTypeId()} fired for ${issue} and caught by TaskVersionListener"
        def assignee = issue.assigneeId
        def assigneeWatcher = userManager.getUserObject(assignee )
        watcherManager.startWatching(assigneeWatcher , issue.genericValue)
    }
}

We are an on-demand instance so I'm under the impression that I can't use this script - however, I'm sure it will be useful to hosted users.

Amber I too have the same issue as you do, wondering if you were able to resolve this by any means.

I too have the same issue as @Amber L Garcia, wondering if you were able to resolve this by any means.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,877 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot