Add/Remove Watchers
You can choose to add or remove watchers on spaces, blogs, or content selected by CQL using this built-in script.
You can select both users and groups. For more information on users and groups, visit the Atlassian documentation Add users and set permissions.
Run this script
Follow these steps to run the built-in script:
- Select Space Tools from the bottom left-hand corner of the screen.
- Select Advanced Space Functionality.
- Select Add/Remove Watchers.
For Select By, enter what type of watcher you want to work with.
Your choices are:
Space
Choose if you want to work with watchers of a space. If you add users and/or groups, they are added as space watchers – not page watchers. If you select Space and remove users as watchers, they may still watch pages in the space.- Enter the space you want to work with for Target Space.
- Enter the groups you want to work with for Apply to Groups.
- Enter the users you want to work with for Apply to Users.
- For Action, select Watch or Unwatch to add or remove users.
Blog
Choose if you want to work with watchers of a blog.- Enter the blog you want to work with for Target Space.
- Enter the groups you want to work with for Apply to Groups.
- Enter the users you want to work with for Apply to Users.
- For Action, select Watch or Unwatch to add or remove users.
CQL
Choose if you want to work with wachers selected by CQL. When you select CQL, the user(s) and group(s) are added as page watchers.In CQL Query, enter your CQL statement.
- This field has CQL Autocomplete, so when you start typing, suggestions will appear.
- For more information about using CQL, check out the CQL Guide.
- Enter the groups you want to work with for Apply to Groups.
- Enter the users you want to work with for Apply to Users.
- For Action, select Watch or Unwatch to add or remove users.
Select Preview to view results, or select Run to apply the change.
- Users are only listed in the results if they have permission to view the selected content.
- If you add a user who was already watching the content, they will not be listed in the results.
- If you try to remove a watcher that was not watching the content, they are not listed in the results.
Example
Add watchers for certain content
If you have a large Confluence instance with many different types of users, you may want to add watchers for certain content. Say you have an instance where each developer has a blog to keep track of notes for their work. If a developer decides to leave the company, they might want to add watchers to their blog and other work so coworkers can find notes about unfinished work. In this case, Ayla Matic (user name is amatic) will want to add Violet Burton (username is violetb) as a watcher to their blog, Ayla's Blog, and all pages created by them in the instance.
Follow these steps to add Violet as a watcher to Ayla's content:
- Select Space Tools from the bottom left-hand corner of the screen.
- Select Advanced Space Functionality.
- Select Add/Remove Watchers.
- Choose Blog for Select By.
- Enter Ayla's Blog for Target Space.
- Enter Violet Burton for Apply to Users.
- For Action, choose Watch.
- Select Run.
The result message: - Navigate back to the built-in scripts page.
- Select Add/Remove Watchers.
- Choose CQL for Select By.
- For CQL, enter creator = amatic.
- Enter Violet Burton for Apply to Users.
- For Action, choose Watch.
- Select Run.
Results
The result message:
Now that we have gone through adding Violet as a watcher to Ayla blog and pages created by her, Violet is following all of Ayla's content to have access to his notes once he leaves the company.