I have a custom field 'Evaluators' where the user can select multiple people from the organization. Is it possible to create an automation that would pick up the evaluators from the field and add them as watchers on the issue?
Hi @Ani Popova
Yes you can! Use the following rule and replace approvers with Evaluators:
Keep in mind that evaluators must have permissions to view the issues.
Hmmmmm, that's a very good idea actually, thanks a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ani Popova
If you are selecting those evaluators from the Jira users, and you can get the accountId from the selections, then you may add them as watchers with an automation rule.
The trick may be to split out the accountId values from the field, split it into a list, and then use advanced branching to iterate over them to add each watcher. Another way might be to use advanced edit with JSON to add them all at once.
Kind regards,Bill
Withdrawing my answer, based upon Darryl's comments.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see what you mean, that's going to take a long branch rule, because probably have about 15-20 people to loop through, but it would work!
The disadvantage would be that every time a new person gets hired, I will have to change the rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Ani! This would still be dynamic; the values from the field drive the new advanced branch mechanism which was recently added. So the branch would just have a few components.
For now, I recommend starting with what Alex suggests based upon the field-value changed trigger. If you run into challenges with add/remove watchers and duplicate watchers, this other technique could help.
Kind regards,Bill
Withdrawing my answer, based upon Darryl's comments.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Whoa whoa whoa! :-}
As much as I love complex branching rules that can iterate over lists, this one can be solved much more easily, because thankfully, Atlassian/CodeBarrel implemented Watchers differently than other fields.
And you can actually add Watchers without affecting existing Watchers (which was my concern with doing any kind of fancy JSON).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ani,
Unfortunately, automation only has the ability to have an actual username selected to add to the watcher field not not groups or values from other fields.
You might could do it via the API, but that is out of my expertise.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My automation rule runs only indicate in addWatcher {{issue.fields.People.accountId}}.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Definitely {{issue.fields.People.accountId}} should be default functionality
{{issue.fields.People.displayName}} - Error watching issues
{{issue.fields.People.Name}} - No actions were performed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for us in a team managed Work-management project
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was looking for the same solution and followed the suggestions found on here but couldn't make it work for me. I want to update the system Watchers field with the value added to a custom Watchers field at issue creation.
However, I use the Post Function at Create transition on the workflow and it works great :-)
Add Post Function > Choose "Copy Value From Other Field" > Add > Choose the Source Field as "custom Watchers" (or whatever the name you have for that custom field), Choose Destination Field as the system "Watchers" > Add
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've attempted to do this a ton of ways based on previous and this set of answers, but I still am not getting watchers added. It says "success" but no actions performed. HELP! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Forgot to specify that this is a company-managed project.
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.