Say you have lots of very old posts that would qualify for being auto closed once you turn that setting on for a category. When you turn on the setting, lets say, to auto close posts after 5 years of no activity, when do all those posts get auto closed? As soon as you click save? Or is there some automatic cleanup that happens in the background. Is that likely to cause performance issues?
And second question, do posts that were auto closed open back up if you change the time on the category? I’m assuming not. I’m also assuming there is no easy way through the interface to re-open in bulk. Is that correct?
By default, the auto-close setting on a category only applies to newly created topics.
Existing topics are not auto-closed as soon as you save the setting. They will remain open unless you explicitly apply the auto-close to them.
There is a dedicated script (rake topics:apply_autoclose) that can be run via the server console to apply the auto-close timer to existing topics. This script silently closes qualifying topics (those old enough, based on your setting), minimizing notifications.
Applying the setting to all old topics at once using the script is a background operation. If you have a very large community and many old topics, it may take some time, but it runs server-side. Performance impact varies depending on hosting and topic count, but the rake task is designed for bulk actions and should not severely affect healthy, well-provisioned Discourse sites.
Discussion on the same is here:
Changing the auto-close time does NOT reopen topics that were already closed (i.e., closure is not reversed).
There is no built-in user interface option to bulk re-open closed topics.
However, you can use a script or a Rails console command to reopen topics in bulk.
Topic.where(closed: true).where("created_at < 'your_date'").find_each do |topic|
topic.update_status('closed', false, Discourse.system_user)
end