Set Watcher Based on Asignee

Is it possible to automatically set a watcher based on ticket assignee?  I would like to automatically add the assignee's manager to every ticket to which they are assigned.

3 answers

You will need a scripted post-function to do that. My issue here is how do you determine the assignee's manager? If that won't be a problem, try different scripted post-functions for automatically setting Watchers based on a condition. There's a lot of them in the marketplace (Try the JIRA ScriptRunner).

If you find out how to do this I'd be interested in knowing your solution. Particularly how do you determine the manager for the current assignee.

 

 

To determine the manager of a user, we normally recommend the following strategy:

  • for users having a manager, story the manager's user name (or user key) as a user property in the user profile
  • if the manager infromation is available in Active Directory / LDAP, synchronize the user property from AD/LDAP so that you can manage the user-manager relation in AD/LDAP. There are add-ons offering this.
    If you do not have AD/LDAP, you can use JIRA REST API to automate setting managers in the user property. 
  • Once the manager's username is stored as a user property, you can use Script Runner to extract the property and add the user as a watcher.

Obviously a custom add-on is always a solution. This would include a manager admin UI and a post-function to add manager as watcher.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published yesterday in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

446 views 6 7
Read article

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