Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,816
Community Members
 
Community Events
168
Community Groups

Automation: Get all users from the project and add as Watcher

Edited
JM I'm New Here Aug 08, 2022

Good Day to all,

I'm currently tasked to do an automation wherein we should "gather" all users added to a certain project (project is only accessible if you're added by an admin). If a new user was added he/she could just be added on the list.

Automation setup:

1. Rule is triggered in multiple setup: 

(set up this say so that, whenever a "new user" is added it he/she will also be "listed")
- Issue Created
- Issue Updated
- Issue Transitioned

2. JQL condition
- type = task and status != "done" or type = sub-task and status != "done"

 

3. Add "all users" as watchers

( how could I get all users on just this project?? )


Sample Scenario:
Members of the project:  Me (Admin), User A, User B

I create a new issue[Tkt-01] -  (me, User A, User B) will be listed as watcher

I added a new user to the Project ~ User C

whenever I update/transition ticket - 
List of watchers should now be ( Me, User A, User B, User C ) - since user C has been added earlier



1 answer

0 votes
Mikael Sandberg Community Leader Aug 08, 2022

Hi @JM,

Welcome to Atlassian Community!

The way I would do it is using the web request action to get the members of a project role and then add the members as watchers to the issue. Automation doesn't have access to project settings, so using the REST API is the only way to go.

JM I'm New Here Aug 12, 2022

Hi Mikael,

Thanks for replying. That could work. May I ask for a bit of an assistance on how could I do that? I'm looking at rest API as well but I have no idea how it works

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

4,959 views 18 31
Read article

Atlassian Community Events