Hello team discourse,
Do we have command line in order to move all topics of 1 category to new tag?
Do we have command line move all topics of subcategory to parent category?
- Navigate to the category with the posts youâd like to change
- Toggle the bulk select tool (upper left hand column header)
- Click the Select All button
- Click the Bulk Action wrench that appears on the upper right hand side
- Click the button in the pop-up to make the appropriate change (Set Category or Append/Replace Tags)
Thank @wesochuck, i know this feauture but each my subcategory have more 1000 topics difficult to load and setup them, so i wanna setup only a comand line ssh to server. Thank everyone!
There are some other topics here with examples of rails commands to select a bunch of posts and do something to those posts. Since you donât have an answer yet you might look for those.
Iâve been too busy to spend spare time on this one myself. If itâs worth money to you I could do this for you for $200 today or half that on Monday.
EDIT: Hereâs a start:
Topic.where(category_id: CURRENT_ID).update_all(category_id: NEW_ID)
Youâll want to take a backup before doing that!
Thank you! i moved subcategory come back parent category success.
I wanna insert and update all topics have a keyword to a tag, i know a little console but not effect, can you fix console same:
Topic.where(âquáşn 1 dtâ).update_all(tags=âquáşn-1â)
rake posts:update_tag[âquáşn 1 dtâ,âquáşn-1â]
I wanna do this action by consale, because my discourse have thousand topic to replace. What console to do this feature? Thank you!
Sorry so much! Im not a developer and donât follow rails console professional, i will try study more. Thank you so much!
Hello,
I run this comand but note effect, can you help me fix this command?
Topic.where(category_id: CURRENT_ID).update_all(tags: âquan-1â)
I run this command but not effect
UPDATE âtopicsâ SET âtagâ = âquan-1â WHERE (âtopicsâ.âdeleted_atâ IS NULL) AND âtopicsâ.âcategory_idâ = 2752
Can we insert or update tag for topic by below console?
UPDATE topics SET tag = âtag_contentâ WHERE topics.category_id = Category_ID_wanna
Hello Discourse,
can we assign tag for all topic have a string, and what command can do it?
example:
UPDATE topics SET tag = âtag_contentâ WHERE topics.content= "a string"
Can be? 
Yes, instructions for doing that are here: Administrative Bulk Operations.
Ă ottimo, ma non sposta il thread della categoria (quello predefinito che contiene le informazioni su di essa), cosa che ho trovato strana, per non parlare del fatto che non riesco a trovare alcun modo per spostare effettivamente quellâargomento.
Quando crei una categoria su Discourse, viene automaticamente creato un argomento âInformazioniâ per la categoria. Tale argomento non può essere spostato. Tuttavia, puoi copiare manualmente il contenuto dellâargomento âInformazioniâ della categoria nellâargomento âInformazioniâ della nuova categoria.
Capisco cosa stai dicendo e in parte lo afferrò, ma non è affatto ovvio perchĂŠ dovrebbe essere cosĂŹ. Ă un argomento che contiene contenuti che, a mio avviso, potrebbero essere spostati se sto spostando tutto in una nuova categoria. Avevo contenuti utili in quegli argomenti e sto semplicemente accorpando le cose perchĂŠ ho successivamente scoperto la limitazione sullâannidamento delle categorie.
Sto solo fornendo un feedback per tenerti informato.
Grazie! Ă un feedback utile. Nellâinterfaccia utente di Discourse non viene visualizzato nulla che ti spieghi perchĂŠ gli argomenti âAboutâ non possono essere spostati.
