Find all watches for a user
Asked by Paul DeSousa:

I have a problem that must of come up before. I have an employee that just left the company and his email is being forwarded the manager. The manager, whom is now receiving the email, wants me to find a way to "unwatch" everything that the ex-employee was watching to reduce the email flow.

For both JIRA and Confluence is there a way to find and remove all watches for a given user?

Thanks in advance!


Answers:
author: Davin Studer
body: Stephen Deutsch has a user macro that can do this. Another option would be to install the [Adaptavist sudo addon](https://marketplace.atlassian.com/archive/com.adaptavist.confluence.sudo) and then sudo as the user and remove them. I know it is archived as says it is not supported on recent versions, but it is still working just fine on my 5.7 instance. Stephens user macro is below.

<https://bitbucket.org/stephendeutsch/confluence-user-macros/src/3accf7c8519dd9a1320de4f6902feaeea4619a86/bulk%20remove%20watchers/?at=master>

comments: author: Paul DeSousa
body: That macro is fantastic! Thank you, problem solved.


author: Stephen Deutsch
body: Thanks for the recommendation! :)


author: Stephen Deutsch
body: The latest version (added just now) can also add or remove user follows:<https://bitbucket.org/stephendeutsch/confluence-user-macros/src/bb28804121a99ccd01b95d0ebed4097468d0244d/bulk%20remove%20watchers/remove%20watches%20for%20user.vm?at=master>


author: Kai Gottschalk [Berenberg]
body: @Stephen Deutsch, the macro is really useful, as we just had the same challenge. Great work! Just for everyones information: It works in Confluence 5.9.x as well!


author: Jonathan Simonoff
body: You might want to look at the answer to a somewhat similar question I asked: <https://answers.atlassian.com/questions/12271154>

(FYI -- we are using LDAP, and our problem is that when users leave their accounts sort of disappear, and but the watches still are there (as Unknown User), and can't be removed. Guilherme from Atlassian provided a DB command to remove all of a user's watches.)


author: RVal
body: You can view Subscribers for a specific space via SpaceAuditor -\> Notifications. It will show you all Blogs/Space subscribers as well as subscribers for all the pages in this space.

In general if employee has left the company why not to delete this employee from the list of users used by Confluence ? I believe this should stop all the notifications for this user.

comments: author: Paul DeSousa
body: Hi, thanks for the info, what is "SpaceAuditor"? Is that a plug in as under space admin or general admin I have no SpaceAuditor. The employee's ID is now listed as inactive in confluence, does that stop notifications? All our users are handled through Active Directory and so there is no local manipulation of users...


author: RVal
body: Yes, sorry, I did not realize at first that it is a separate plugin to be installed:<https://marketplace.atlassian.com/plugins/com.vertuna.confluence.plugins.spaceauditor>I'm not sure if Confluence still sends notification to inactive users.


author: Paul DeSousa
body: OK Space Auditor is a plug-in. I'll check it out. Side note in the report is lists total pages and total current pages. What makes a page "current" in Confluence?


author: Paul DeSousa
body: For JIRA it was very easy just issue a JQL of watcher = "uid" and that solves it for JIRA. Now to confluence...


Tags: confluence-administration