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?
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
Hi,
Should we be placing the above code on the parent page??
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Get to the page, open up web inspect (chrome) and paste the code into the Script tab.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked for me as well, but the Scripts tab no longer exists in the current version of Chrome and is now called Sources.
$(function(){ $('.link-stop-watching').click(); setTimeout(function(){location.reload();},2000); });
Mind you, it's not a 100% bulk removal, but a bulk removal per page. It's less tedious than unwatching one-by-one. Repeating step 4 is really a matter of hitting the paste shortcut keys, enter and let it refresh, paste shortcut keys, enter and let it refresh, etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This has saved me 1,000 point and clicks :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Very useful, saved heck of time!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked beautifully and saved me thousands of clicks. Not just in Confluence, but in email as I dispose of email notifications. Thank you very much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Terry Campbell Thank you so much for taking the time to enter that workaround! I had 9 pages of watch entries to change so this saved me who knows how many tedious clicks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot. Saved me loads of time with 183 pages.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This JavaScript worked for me on Confluence 5.6.6
$(function(){ $('a.link-stop-watching').click(); setTimeout(function(){location.reload();},2000); });
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
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.
thanks that is so far the best solution
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.
You may also want to watch/comment/vote on this issue to stay updated: https://jira.atlassian.com/browse/CONF-8458
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A small addendum for the JS snippet:
* I added *space watches* and want to keep these.
* So I use this:
$(function(){
$('table[id="page-watches"]').find('a[class="link-stop-watching"]').click();
setTimeout(function(){location.reload();},2000);
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do this for each space you want to apply the change:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.