It would be very helpful for the users to replace terms using some drush command as it will save a lot of time.

Comments

manish-31 created an issue. See original summary.

manish-31’s picture

Status: Needs work » Needs review
StatusFileSize
new4.04 KB

Drush command to replace terms are added.
Use following command to replace terms :
drush ct-replace old_taxonomy_term_name new_taxonomy_term_name.

gchauhan’s picture

Status: Needs review » Needs work

Create a command support for drush9 too.

manish-31’s picture

Status: Needs work » Needs review
StatusFileSize
new9.71 KB

In patch #3 I've added command for drush 9. Please apply and review this patch.
Use following command to replace terms:
ct-replace old_term_name new_term_name
Note: If your term name contains two or more words wrap them with double quotes for eg:- ct-replace "old term" "new term".

anmolgoyal74’s picture

Status: Needs review » Needs work

Command is working fine, but the logic doesn't seem working as required. The count after replacing terms is not correct also terms are not getting replaced.

anmolgoyal74’s picture

@manish-31
Please refer the related issue to update the patch.

manish-31’s picture

Status: Needs work » Needs review
StatusFileSize
new7.8 KB

@anmolgoyal74 I've changed the logic to replace terms using drush command. Please apply and review this patch.
Use following command to replace terms:
drush ct-replace old_term_name new_term_name
Note: If your term name contains two or more words wrap them with double quotes for eg:- drush ct-replace "old term" "new term".

gaurav.kapoor’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.