Make members of a group watch a category by default


(Allen - Watchman Monitoring) #24

To have this option in the Group settings… so that we can add Watch status to members of a given group, it’s be nice.

Of course, this begs inheritance, permanence, and hierarchy of groups… but, this is what I need for two of my four discourse.


Confirming - it's OK to set default watch for categories a user can't see
Confirming - it's OK to set default watch for categories a user can't see
(Allen - Watchman Monitoring) #25

I think that we can deal with this for the most part by setting defaults for everyone.

However, I’d still enjoy a setting on a Group that would apply Watch status to members as they were added. This would help in case someone had removed it from their profile before, and now that they’ve been added to the group, it’s best if they Watch the related category again.


(Kane York) #26

What happens when someone is removed from the group?

What happens if they were watching the category, then are added and removed?


(Allen - Watchman Monitoring) #27

If they are removed from a group, it will be just like I had set a group as default universally (no more notices for them, it wouldn’t show in their profile)

If they were watching and got removed & re-added, it would re-add the watch.

If the user had removed it… well, it’d be re-added. As an admin, I can let them know this is the case & give’m a heads-up.


(Kane York) #28

I don’t think you addressed the last one.

  1. Initial
    User is not in the group, not watching the category
  2. User watches the category
    User is not in the group, watching the category
  3. User is added to group
    User is in the group, watching the category
  4. User is removed from group
    ???

(Allen - Watchman Monitoring) #29

4 - nothing happens, they stay “watching” the category.

says here that it’s just fine

This is assuming that the only reason they can see the category is because they were in the group. But regardless, removing doesn’t need to change the watch settings.


(Tobias Eigen) #30

This is exactly what I have been thinking as well - and it’s good to see this problem is solved for new users using the awesome new default user settings (thank you so much @zogstrip - merci beaucoup!)

… but this does not help with existing users. I think the ability to even just see who in a group is watching a certain category would move me along in ensuring that everyone who needs to be is watching it.

According to Sam…

If anyone is willing to create a howto for this I would be immensely grateful.


(Tobias Eigen) #31

I just noticed this discourse plugin:

It appears to be by @techAPJ - can you confirm this works and can you give any guidance on configuration? If so it solves my problems!


API call to watch categories and tags
Setting all users to watch a category
(Arpit Jalan) #32

Yep, it works!

You will need to fork the plugin and edit category and group name in plugin.rb file.


(Tobias Eigen) #33

wow - it works! thanks much.


(Allen - Watchman Monitoring) #34

Any chance we an get @techAPJ plugin rolled into discourse proper?


(Tobias Eigen) #35

This would be nice! I have been discouraging this generally on my site but there are frequent requests for private categories set up as mailing lists, for working groups that are working very closely together yet don’t log in frequently if at all. I’d rather set these up on discourse than on elsewhere on google groups etc. This can only work if I am able to force members of those groups to watch their category.

Making a code change and rebuilding each time I create a working group is not ideal but it’s reasonable.


(Allen - Watchman Monitoring) #36

The issue I’m facing here is that I need to make a new category which I need everyone subscribed to.

the recently added controls allow me to have it as a default for new users, but I’m still lacking a UI to say "everyone who’s in this group… I force this new Category in your watch list. (they can opt out later if they like)


(Tobias Eigen) #37

@techAPJ has solved just this problem with a plugin… See above. But it’s not configurable via the ui.


(Allen - Watchman Monitoring) #38

Thanks @tobiaseigen I want to suggest, not enforce that members of a given group watch a Category. In our use cases, it’s fine if they want to change to notify, or just unwatch if they don’t want all the emails.

This is solved for all new users in this bit of awesome by @zogstrip

However, it doesn’t help when there’s a new category, and I want to add it for existing users [without diving into the database]


(Tobias Eigen) #39

I guess you could use the plugin to add the category watching settings, then run it via sidekiq, then remove the category from the settings.


(Allen - Watchman Monitoring) #40

I’d sooner pay someone to submit a PR for this to core.

(Besides, the forum I’m going to need this on most is hosted w discourse, and I want our team to be able to do this at-will.)


(Ryan Wanger) #41

Hey @pacharanero, I’d love to see an updated graph that shows what happened in the days/weeks following your change. Did it stick?


(Jenn Briden) #42

I would love to have this ability for subsets of my userbase. We are using Discourse for our company forums, and we have employees (defined via a group) that should get subscribed to specific notifications that we don’t want to require for all users.

This group is 200 people, and while it is possible for me to go and hand edit each profile, that seems tedious. I would like this to be set up for new members of the group as they get added, so the ad-hoc model doesn’t work so well for that.


(Alex Armstrong) #43

I revised the “Watch Category” plugin for my own site, incorporating code from both Jared Needell and Thomas Purchas.

You can find it here:

This version allows you to automatically watch a category or sub-category for all the users in the system or all the users in a particular group.

Features that are still missing:

  • Support for tags
  • Admin UI. This looks tricky as I don’t see any UI that supports nested arrays, which you’d probably need.
  • Users don’t automatically stop watching categories if they’re removed from a group. Should this be an (optional) feature? What happens if a user is removed from a group that prevents them from having access to a category that they’re still watching?

I don’t know Ruby and just cobbled together this for my purposes. I hope that more skilful people than myself can work on the above.


Make permissions visible on private categories
Sending Bulk User Invites