Hi,
Is it possible to create an automation that creates a wotk item and adds some users as watchers?
Thanks in advance!
There is an action called Add watchers. Give it a try.
The other option its API. The first one its used when the context of the work item doesnt change. If it does, use the API (the API can only add one watcher at a time. You need the accountid and if you have more than one watcher, you will need ot call the API several times)
https://support.atlassian.com/jira/kb/automatically-add-watchers-to-issues-on-creation/
I forgot to mention that adding watchers using advanced field editing JSON won't work!! Only two options: the automation, add watcher action and API.
Regards
Hi @Aaron Pavez _ServiceRocket_ ,
Thank you for your comments.
I have an automation in Space_1 that creates a work item in Space_2.
I have created a second automation in Spce_2 "When a work item is created" then add wathers and it works but only when work items are created manually (from the user interface). But it does not work when the work item is created from the automation from Space_1.
Any toughts?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi again!
Have you checked the box?
Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Aaron Pavez _ServiceRocket_ ,
It works!! Thank you so much for your help! I forgot to enable this feature.
BTW it would be nice to have this in one automation instead of two in different spaces.
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here, you can't use the Manage watcher action after the clone action. Due to the scope.
You can do it on the first automation, but for that, you need to use the API.
Remember to use several calls for several watchers! example:
API
The API is the best option when the context changes. Here, each watcher must be added 1 by 1.
https://yoururlhere.net/rest/api/3/issue/issuekeyhere/watchers
Body
"712020:1fe84e29-0949-4bb0-xxxxxxxxxx"
This is the accountId.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Aaron Pavez _ServiceRocket_
I believe if the rule scope is changed to include all the projects / spaces involved, and then branch to the Most Recently Created Work Item after the cloning, the Add Watchers action could be used directly. This would allow doing this in one single rule.
Kind regards,
Bill
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.