Bulk move many topics from one category to another

Is there a query to bulk move many topics from one category to another? I want to consolidate many categories into one category and would like to make the move quickly and all at once, and also not bump the topics.

Bonus: also want to tag topics first with a category-equivalent tag before moving them.

Grateful for any queries or recipes. Many thanks! I’d even write it up as a howto topic if it’s good. :slightly_smiling:

「いいね!」 7

このトピックを整理し、OPで質問を解決するための現在の最良のオプションを追加しました。不足しているものや問題に気づいた場合は、お気軽にご返信ください。

:warning: 大量の変更を加える前に、念のためバックアップを取ってください…

UIでのトピックの一括タグ付け/移動:

小さなカテゴリやトピックのサブセットの場合、一括選択ツールで十分な場合があります(この投稿の最後にある通知に関する注を参照)。

すべてのトピックをあるカテゴリから別のカテゴリに移動する

まず、サイトのコンテナに入ります:

cd /var/discourse
./launcher enter app

カテゴリ内のすべてのトピックに一括でタグを付ける:

まず、サイトのコンテナに入ります:

cd /var/discourse
./launcher enter app

これらの方法がどのような通知をトリガーするかは100%確信がありませんが、懸念があり、通知が送信されないことを絶対に確認したい場合は、作業中に次の設定を確認することをお勧めします:

  • disable_category_edit_notifications
  • disable_tags_edit_notifications
「いいね!」 15

@tshenry 素晴らしい!本当に助かりました。ありがとうございます!

「いいね!」 4

このトピックは、最後の返信から30日後に自動的にクローズされました。新しい返信は許可されていません。