Bulk change categories without logging edit

AI-generated summary

The user jomaxro is seeking a way to bulk change categories on an old, poorly managed Discourse site without creating edit logs, which would otherwise clutter the history and require manual cleanup. sam suggests a potential site setting to prevent bumping during bulk actions and offers console-based solutions. jomaxro explores the console method, referencing a guide, and later confirms that using the admin wrench on the /latest page with the “Select All” function allows bulk category changes without logging edits or bumping topics, which is ideal for their self-hosted site. This UI method is preferred over console access due to IT restrictions.

Long story short: the Discourse I’m currently working on is quite old. Further, it was primarily run by people who did not understand Discourse, and so many things were deleted, unlisted, moved, etc. that shouldn’t have been, and are now causing complications.

I want to “fix” the broken categories - mostly those with deleted/unpinned description topics. I’m looking to do the following:

  1. Rename broken category.
  2. Create a new category.
  3. Recategorize all topics from broken category to new category.
  4. Delete broken category.
  5. Repeat until all broken categories are deleted.

Which leads me to:

  1. Can I bulk recategorize topics without causing it to be logged? I don’t want most topics on the site to have an edit, nor do I have time to hide the revision for 1,000+ topics.
  2. Is there a better way to fix old “broken” categories?

There have been some discussion about “non bumping” edits, I am totally unsure about how to introduce this without adding noise.

I guess one option would be to add a site setting for “don’t bump for bulk actions”, then you would enable it temporarily, make your changes and then disable.

If you need to do this today you can do it from the console. If this is for stonehearth we can help out.

I like this idea. Sort of like the way restore works now.

Not Stonehearth, a self-hosted internal site for my company. Mind sharing the rails commands?

Edit: Found this, can you confirm Sam that this is still accurate/safe? It looks like @tobiaseigen had some issues (incorrect category counts and “about this” topics moving). Also, for the category IDs is it best to get them from site.json, or is there an easier way?:
https://meta.discourse.org/t/bulk-move-many-topics-from-one-category-to-another/38704/2?u=jomaxro

Edit 2: Looks like the admin wrench change category button does not log edits - none of the categories have a large number of topics, so I can use the Select All button to handle this. (I don’t have console access on this site anyway, would have needed to bother IT - so this UI method is certainly preferred.)

To close this out, taking advantage of the rails console allows you to move large numbers of topics from one category to another without edit logs. Bulk edits from the admin wrench on /latest also do not log edits or bump topics.