Make members of a group watch a category by default

(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
(Allen - Watchman Monitoring) #44

Wow, this is very exciting… hope to try it out soon!

In the official user defaults, I have every user watch all relevant categories by default. If they aren’t in a group which gives them permission to view - they simply don’t get the messages. No problem.

This way, if they are added, they automatically start getting the right messages.

I don’t think it’s important that you have users auto-stop watching categories if they are removed from a group. If they auto-start again when re-added to a group then it’s kinda 6-one-way, 1/2 dozen-the-other, however, the logic as to which groups to remove them from based on what membership could get really ichy if two groups each grant access to a given category, and a user is removed from just one group.

(Alex Armstrong) #45

Thank you for clarifying this! I’ve wanted to try it, but mailcatcher doesn’t work on my development server. And thus had no way of testing email notifications, except on production :scream_cat:

Ah, true. I hadn’t thought of this case. It could get really hairy. Like Sasquatch hairy. :monkey:

I should note that I haven’t tried my plugin in production, as I wanted to figure out the the permission stuff first. I’ll try it over the weekend. People are less likely to be looking at the forum then – in case it explodes.