Can I add watchers based on a custom field?

Emily Spencer May 2, 2013

I have a custom field that lists different teams that would be affected by a new ticket. I'd like to set up the notifications so that when a specific team is chosen from the list, a certain set of watchers are automatically added to the ticket. Is this possible?

2 answers

1 vote
Bhushan Nagaraj
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2013

Hi Emily,

You can use the script runner plugin and WatcherManager to add watchers to the issue based on a custom field value

https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner

http://docs.atlassian.com/jira/latest/com/atlassian/jira/issue/watchers/WatcherManager.html

Bhushan Nagaraj
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2013

Oops sorry didn't notice the OnDemand

Kathleen Jacobs June 4, 2013

How would you do this on Download jira?

0 votes
Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 2, 2013

I'm not sure if you can use the Script Runner in OnDemand, but you should be able to add any user/group picker to the notification scheme - this way any user in the custom field will be notified for the events you configure.

Emily Spencer May 2, 2013

Thank you both!

Matheus, I think that I follow you but let me know if I've misunderstood. If I do it that way with having a custom group picker field and then defining my watchers as specific groups, I believe that I lose the ability to limit what appears on the list. Won't the custom field dropdown display all of the existing groups?

I like to make this field available when creating all new tickets in a project so I'd prefer to keep it fairly restricted with what appears in the dropdown.

Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 2, 2013

Won't the custom field dropdown display all of the existing groups?

I'm afraid that all groups will indeed be displayed in the Group Picker.

I've also tested using a post-function to copy the value of a custom field to Watchers, but with no luck. :/

Suggest an answer

Log in or Sign up to answer