Bulk Unwatch pages?

Is there any way to bulk unwatch pages in Confluence? With the new autowatch feature, users end up watching potentially hundreds of pages. It's extremely tedious to individually unwatch these pages. How can we remove all watches at once or selectively in bulk?

8 answers

2 accepted

10 votes
Accepted answer

If you have no access to the DB one could use the browser's JavaScript console

$(function(){
  $('.link-stop-watching').click();
  setTimeout(function(){location.reload();},2000);
});

With this you can at least remove all watches that are shown on the watches page. No fun if you have 110 pages of watches (like me), but better than clicking every "Stop Watching" link by hand laugh

We were facing the same problem. What we finally did was dropping the entries in the NOTIFICATIONS table in our database. It looked something like this since we only had to drop the notifications of the person who had initially created the Confluence layout.

DELETE FROM NOTIFICATIONS WHERE username = '<user's name>';

After that we experienced a problem that the user the user got an exception when he first tried to view his watches. After watching a random page everything was fine. I don't know if this is the "correct" way but I was looking everywhere before we decided to apply changes directly to the database.

By the way, we globally unchecked the "autowatch" feature:

Workaround

The config lives in an XML file: <confluence install>/confluence/WEB-INF/lib/confluence-x.x.x.jar/preferences-default.xml.

You need to change the boolean value to false, thus:

<preference type="Boolean">
       <name>confluence.prefs.watch.my.own.content</name>
       <value>false</value>
   </preference>

Then place it as <confluence install>/confluence/WEB-INF/classes/preferences-default.xml and restart Confluence.

For more details on modifying jarred config files, please refer to this doc: http://confluence.atlassian.com/display/DOC/Editing+Files+within+JAR+Archives

Hope this works for you

Cheers

Christian

Christian,

Thank you for your response and tips. That's what I was afraid of...

Shawn

For all the administrators suffering from this problem, I have written a pair of user macros to fit two use cases:

1. Removing a set of watchers from a set of child pages (and re-adding them, in the case of a temporary change, like moving a bunch of pages).

2. Removing watches for a particular user (or yourself) filtered by space (also with the option to re-add).

You can choose the pages you want from a list of checkboxes, so you can choose as many or as few as you would like.

Note that you must be running an installed version of Confluence (now known as Confluence Server) and have "Remote API" (under General Configuration) enabled.

They should be compatible back to Confluence 4.0, although I haven't been able to test it exhaustively.

You can find the user macros here:

https://bitbucket.org/stephendeutsch/confluence-user-macros/src

Navigate to "bulk remove watchers" and you can find the two macros. "remove watchers" is for use case #1, and "remove watches for user" is for use case #2.

Simply give them a name in the user macro browser (you probably want to select the option "Visible only to system administrators in the Macro Browser"), embed them in a page, and you are all set to go! Using them is pretty self-explanatory.

If you have any questions, you can e-mail me at stephen.deutsch@zanox.com, but I can't offer full support, so please use it at your own risk.

Perhaps this will motivate Atlassian to implement some sort of solution themselves...

This JavaScript worked for me on Confluence 5.6.6

$(function(){
 $('a.link-stop-watching').click();
 setTimeout(function(){location.reload();},2000);
});
1 vote

You may also want to watch/comment/vote on this issue to stay updated: https://jira.atlassian.com/browse/CONF-8458

thanks that is so far the best solution 

Working great and it's free! Also, user can do it themselves.

Hi all, there is a workaround using the free descendant notification plugin of adaptivist, which removes all watches fo a space, see https://marketplace.atlassian.com/plugins/com.adaptavist.confluence.descendentNotification/versions#b302

- Activate watching the page family on root page of a space (will temporarily set you as watcher on all pages of this space)

- Edit page family watches (on the root page or in your personal settings)

- Choose Remove root and all watches on child pages in the page family management page

Don't be too quick in doing this in large spaces. The plugin just does a bulk add or bulk remove on all the pages, which takes a while to finish.

At least that helped me removing my ~ 3800 watches in about 30 minutes.

Good luck.

Matin

P.S.: And don't forget to dump your trashes, might decimate your watchlist too

The javascript posted By StAn above didn't work for me on Confluence 4.3. But this did:

$(function(){
$('a.icon.icon-stop-watching').click();
setTimeout(function(){location.reload();},2000);
});

Thanks for the tip!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 2 hours ago in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

63 views 0 7
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you