Convert all existing topics in category to wikis

Hi matenauta :slight_smile:

Yes, it would be possible by using the logic here:

https://meta.discourse.org/t/administrative-bulk-operations/118349#move-all-topics-with-a-specific-tag-to-a-single-category-15

Example (tested and working):

tag = Tag.find_by_name("design")
topics_id = Topic.joins(:topic_tags).where("topic_tags.tag_id = ?", tag.id).pluck(:id)
Post.where(topic_id: topics_id, post_number: 1).update_all(wiki: true)
2 Likes