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:

해당 주제를 정리하고, OP(원문)의 질문에 대한 현재 최선의 해결 방법을 추가했습니다. 누락된 부분이 있거나 문제가 보이면 편하게 답변해 주세요.

:warning: 문제가 생길 경우를 대비해 대규모 일괄 변경을 수행하기 전에 반드시 백업을 만들어 두세요…

UI를 통해 태그/주제 일괄 이동:

작은 카테고리나 주제의 일부 집합에 대해서는 일괄 선택 도구가 충분할 수 있습니다(알림에 대한 주의사항은 이 게시글의 끝에 있습니다).

한 카테고리의 모든 주제를 다른 카테고리로 이동

먼저 사이트 컨테이너에 진입합니다:

cd /var/discourse
./launcher enter app

카테고리 내 모든 주제에 태그 일괄 적용:

먼저 사이트 컨테이너에 진입합니다:

cd /var/discourse
./launcher enter app

이러한 방법들이 어떤 유형의 알림을 트리거하는지 100% 확신하지는 못하지만, 알림이 발송되지 않도록 확실하게 하고 싶다면 작업 중에 다음 설정을 확인하는 것을 권장합니다:

  • disable_category_edit_notifications
  • disable_tags_edit_notifications

@tshenry 정말 제 하루를 구해주셨어요! 정말로 감사해요!