How to select a lot of topics fast?

Can somebody please tell me which Discourse client side event I should be using to tell when the page has finished updating?

I seem to remember there is also an event that fires when the page changes? That would be helpful too.

Thank you.

Is there going to be any alternative for having fast-multi-selection of topics from Discourse. Because the jQuery hack at the top is no longer working for me. Someone brought up doing a ā€œsearch allā€ for the forum. How does that work?

2 Likes

Sure maybe @techapj can come up with a hack that works on the current version?

Thanks @codinghorror for responding.

This is the thing, I have boards that Iā€™m going to eventually need to remove that have over 6-7,000 topics (that translates to over 30,000 posts in some). Removing topics at the rate of 50 at a time - cause I finally figured out how to search all topics for a forum - isnā€™t going to cut it for those of us at an enterprise level. Just cleaning up staging has taken me most of the day to do the simplest things of re-ording and dumping old boards that I donā€™t need there.

Should I post, as an idea, creating a method to remove all posts at once from a forum, in order to delete that category, so we can see how many would like that? Or, a means of deleting a category, posts and all, all at once?

Unfortunately, as you gain more enterprise users of Discourse, you are going to run into this as an issue over and over again. I can guarantee it. :sunglasses:

Regardless, itā€™s going to be mega-slow as doing this triggers probably a hundred database touching code paths. So if you are ā€œrecategorizingā€ 30k topics an entirely different (probably pure sql, bypassing active record) will be necessary.

Would it be more than the 30 or 40 minutes it will take to manually delete 6,000 topics? :sweat_smile:

When using on Enterprise you gotta get your hands dirty sometimes.

I have a need to sync groups with employee groups, with more than 10k users a day. We just drop to database and update users groups accordingly.

:persevere: I guess Iā€™ll get thereā€¦

I was finally able to migrate one of my Xenforo forums into Discourse. The migration dumped everything in Uncategorized as there were no categories established on a fresh install of Discourse. Iā€™m glad I was able to get the script to work, but now I have all posts from 2011 to present in Uncategorized. My intent was to select all and place into the ā€œArchiveā€ category. Perhaps I should have read more about the need to manually click each topic to execute bulk actions. It seems a bit weird to not have a ā€œselect allā€ feature to mass move topics.

1 Like

I recently went through the process of moving topics from inactive categories to other locations. I used a tool called Keyboard Maestro to simulate pressing space/tab 1000 times to effectively select all topics in a category. A bit of a hack, but got the job done.

Note this solution might work for a few hundred topics. Not sure about thousands.

3 Likes

This code was not working for me:

$('input[type="checkbox"]').attr('checked', 'checked')

It was checking the boxes, but the wrench button wouldnā€™t pop up (I donā€™t think Discourse was registering them as having been selected).

So instead, I simulated a click with:

$('input[type="checkbox"]').each(function() { this.click()})

and this worked as though Iā€™d manually clicked the checkboxes myself. This seems to be the simplest way to do this for one-time migrations. I hope this proves helpful :slight_smile:

1 Like

This is still on @techapjā€™s list, at least for selecting all topics currently visible.

2 Likes

This feature is now available via:

7 Likes