Waarschuw bij het wijzigen van de categorie van een onderwerp dat in dezelfde categorie wordt gepubliceerd

AI-generated summary

The discussion revolves around a feature request to warn users when changing a topic’s category to the same category it is scheduled to be published in. Nacho_Caballero highlights two scenarios where this occurs: scheduling a topic to a different category and then changing it to that same category, or scheduling a topic to its current category. They suggest showing a warning or preventing the schedule from being saved in such cases. codinghorror agrees and asks for an effort estimate. eviltrout confirms the fix would be simple, estimating a couple of hours. riking notes that a similar fix was already implemented for shared drafts and suggests following the same model by updating the scheduled action when the category is changed.

I’ve noticed it’s possible to do this:

  1. Create a topic in Category A
  2. Schedule the topic to get published to Category B the next day
  3. Edit the topic’s category to Category B

At the bottom of the topic it will say “This topic will be published in #Category B in 24 hours” even though the topic is already in that category.

Same thing for this flow:

  1. Create a topic in Category B
  2. Schedule the topic to get published to Category B the next day

I think it would make more sense to either:

  • warn when the scheduled category coincides with the new category (flow 1) or with the current category (flow 2), or
  • remove the schedule notice (in flow 1) or not allow the schedule to get saved (in flow 2)
2 likes

It’s a bit of a self-inflicted wound, but I certainly agree we should show a warning in this case if it’s not too much work.. can you estimate the effort next week @eviltrout?

1 like

We could show a warning if the categories are the same quite easily. I would estimate just a couple hours of work. Can you take a look @riking ?

3 likes

Looks like @dan already fixed this for the shared drafts case:

https://github.com/discourse/discourse/commit/c3bab3ef3816ba17e1a9a9c64582fc2e2336a8f1

That model is probably what I should copy here - make the category edit save into the scheduled action.

2 likes