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

This widget could not be displayed.

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).

This widget could not be displayed.

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.

 

 

This widget could not be displayed.

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
Community showcase
Posted yesterday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

81 views 0 1
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