Bulk move many topics from one category to another

AI-generated summary

Bulk Move Many Topics from One Category to Another

tobiaseigen is looking to consolidate multiple categories into one and wants to bulk move many topics without bumping them. They also want to tag topics with a category-equivalent tag before moving them.

Bulk Tag/Move Topics through the UI:

For small categories or subsets of topics, the bulk selection tool can be used.

Move All Topics from One Category to Another:

To do this, enter the site’s container and use the following rake tasks:

  1. Find category IDs: rake categories:list
  2. Move topics: rake categories:move_topics[<starting_category_id>,<destination_category_id>]

Bulk Tag All Topics Within a Category:

To convert a category to a tag, use the following rake task:

rake tags:bulk_tag_category["<tag>|<tag>",<category_id>]

This will remove existing tags. To append tags instead, add true as a third argument:

rake tags:bulk_tag_category["<tag>|<tag>",<category_id>,true]

Important: Take a backup before making major bulk changes and be aware of notification settings.

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:

لقد قمت بتنظيف هذا الموضوع وإضافة أفضل الخيارات الحالية لحل الأسئلة في المنشور الأصلي. إذا كان هناك أي شيء مفقود أو إذا لاحظت أي مشاكل، فلا تتردد في الرد.

:warning: قم بعمل نسخة احتياطية قبل إجراء تغييرات كبيرة بالجملة فقط في حالة…

وضع علامات/نقل المواضيع بشكل جماعي عبر واجهة المستخدم:

بالنسبة للفئات الصغيرة، أو مجموعات فرعية من المواضيع، قد تكون أداة التحديد الجماعي كافية (انظر الملاحظة في نهاية هذه المشاركات حول الإشعارات).

نقل جميع المواضيع من فئة إلى أخرى

أولاً، أدخل حاوية موقعك:

cd /var/discourse
./launcher enter app

وضع علامات على جميع المواضيع داخل فئة بشكل جماعي:

أولاً، أدخل حاوية موقعك:

cd /var/discourse
./launcher enter app

لست متأكدًا بنسبة 100٪ من أنواع الإشعارات، إن وجدت، التي تثيرها هذه الطرق، ولكن إذا كنت قلقًا وتريد التأكد تمامًا من عدم إرسال الإشعارات، فأوصي بالتحقق من الإعدادات التالية أثناء العمل على هذا:

  • disable_category_edit_notifications
  • disable_tags_edit_notifications

@tshenry لقد أنقذت يومي للتو! شكراً جزيلاً لك