Category watch preferences not honored on recategorization


(Jeff Atwood) #1

Repro:

  1. Watch a category “foo”

  2. Post a topic in a different category “bar”

  3. Recategorize the new category to the category “foo”

The topic will not be watched.

Also works in the opposite direction: sometimes when things are erroneously posted to a meta category (which I am watching) and then recategorized to a different category (which I am not watching), it still shows up as watched for me. e.g. changing the category didn’t update the watch state.

But it should!


(Kevin P. Fleming) #2

Should it only remove the watch state in the latter case if the watch state was derived from the category? If you had manually marked it to be watched, you’d want that to stay in place.


(Sam Saffron) #3

The more general problem that is a huge complication is.

  1. User A: creates a topic in category bar

  2. User B: starts watching bar

  3. User B is not watching topic user A created.


(Jeff Atwood) #4

That is completely unrelated to this topic, though. “is the setting retroactive?” also affects setting your general topic tracking states, e.g. setting “show topics as unread when I have entered them” has surprising and unwanted retroactive effects.

Still… unrelated to recategorization.


(Sam Saffron) #5

At the moment the only hook to watch stuff is on creation, we are opening a bit of worm can here, if we allow auto watch on category edit, we also need to do unwatch on category edit-out which starts touching on the same issue history has


(Jeff Atwood) #6

I think we should at least handle the common case here for 1.4 @zogstrip can you add this to your list?

If a topic is recategorized within (n) days of creation, change notification state to match the preferences of anyone in that category, unless they have it explicitly set for the topic.


(Régis Hanol) #7

We will now change notification state to match the preferences of anyone in that category when a topic is recategorized within 5 days of creation (unless they have it explicitly set for that topic) :cat2:

https://github.com/discourse/discourse/commit/9ae9aed01068d90bf337f91e871f9dfe56b8a969


Category watch preferences still not honored on recategorization
Notifications when a topic is recategorized
(Jeff Atwood) #8