Closed (fixed)
Project:
Rules
Version:
7.x-2.x-dev
Component:
Module Integrations
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Mar 2011 at 19:35 UTC
Updated:
16 May 2014 at 14:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedI would like this feature too. This could become very handy for maintenance tasks. I'm willing to help with this feature if a module maintainer would support me with answering questions. ;)
Comment #2
fagoSounds great! I'd love to help with answering questions.
I think what we need for that is a way to textually input all data types. For most of them, this should be easy but stuff like 'text_formatted' might need some extra treatment.
Comment #3
mitchell commentedComment #4
greg.1.anderson commentedSeems to me this would be better off in the Rules queue. You could make a rules.drush.inc file, and put your Drush commands there. Then your rules-based commands would be available on any Drupal site with Rules enabled.
See
drush topic docs-commandsfor info on writing your own Drush commands.Comment #5
moshe weitzman commentedComment #6
fagoAgreed. Let's add a drush integration that exposes rules actions as drush commands.
Comment #7
moshe weitzman commentedIn the meantime, Views Bulk Operations (VBO) module has great drush+actions integration. Might solve a few needs
Comment #8
mitchell commentedtagging
Comment #9
mitchell commentedUpdated component.
Comment #10
bailey86 commentedAlso, would it be possible to enable/disable rules using a Drush command?
Comment #11
arithmetric commentedAttached is a patch that implements drush integration for Rules to provide a list, enable, and disable command.
I modeled the patch after the Features module's drush integration. Following that model, one could implement additional commands for operations like exporting and reverting rules.
Comment #12
seanrCursory review looks good, but haven't tested. Next step, assuming this tests out well, would be to add execute to it for specific components.
Comment #13
ohthehugemanatee commentedLooks good, and tested working.
Comment #14
dixon_Shameless cross post: #2089437: Drush integration for executing Rules Scheduler tasks
Comment #15
kenorb commentedI've tested it and it seems to work correctly.
I've managed to successfully disable all the rules by the following command line:
Comment #17
fagoThanks, looks good and seems to work -> Committed.