Batch Delete topics in a category?

Might be quicker to use rails console for this until there is GUI support. Would there be any consequence of running?:

Topic.where(category_id: 1).destroy_all

I assume this will clean up after itself? @zogstrip @sam

2개의 좋아요

It may take hours or even days to run if the number of topics is large.

2개의 좋아요

I’m really liking discourse so far, but this seems like a basic admin feature that has been overlooked. Another, clunky way to do this is to create some kind of macro that will select, scroll down, select, and so on.

I believe adding basic “select all visible topics” is on @techapj’s plate for this release.

2개의 좋아요

Jeff, can you define “visible”? Is this only what can be seen on screen, or what is loaded at the moment?

Only what is on screen. Otherwise it is a very hard feature to build and it could take hours or even days to run if you “selected” six thousand topics.

2개의 좋아요

Makes sense. Still would be nice to have some way to select all topics in a category, even if a background task like exporting a report.

This is now done :sunny:

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

10개의 좋아요