I am using Rules Scheduler to do routine tasks on my site. It would be great to be able to not execute the rule if the site is in maintenance mode. I checked under data comparison and didn't see a way to easily test this variable. Is there a way to do this currently w/o using PHP, or should I make this a feature request?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR’s picture

Version: 7.x-2.2 » 8.x-3.x-dev
Category: Support request » Feature request
Issue summary: View changes
Status: Active » Postponed

If someone wants to contribute a patch to implement this, I'm willing to take a look at it.

TR’s picture

TR’s picture

Status: Postponed » Needs review
FileSize
4.01 KB

Now that #2840815: Support custom Conditions that don't need context has been committed, we can implement this new feature.

Here is a patch with a new condition to test if the site is in maintenance mode, as well as a unit test for this condition.

Please review.

TR’s picture

Priority: Minor » Normal
TR’s picture

Project: Rules » Rules Essentials
Version: 8.x-3.x-dev » 8.x-1.x-dev
Component: Rules Core » Conditions

Actually, since there has been absolutely NO interest from the community since this feature request was made back in 2012, I'm going to add this as a feature to my own project.

TR’s picture

Re-rolled patch for new namespace.

Status: Needs review » Needs work

The last submitted patch, 6: 1719572-6.patch, failed testing. View results

TR’s picture

Status: Needs work » Needs review
FileSize
4.13 KB
rodmarasi’s picture

following your work on Rules and Rules essentials. thanks for the efforts

Status: Needs review » Needs work

The last submitted patch, 8: 1719572-8.patch, failed testing. View results

TR’s picture

Status: Needs work » Needs review
FileSize
6.84 KB

Patch relies on features in Rules 8.x-3.x-dev, while the testbot only will test against Rules 8.x-3.0-alpha4. So we have to make the patch backwards compatible until the next Rules alpha is released.

Status: Needs review » Needs work

The last submitted patch, 11: 1719572-10-maintenance-mode.patch, failed testing. View results

  • TR committed 14629a8 on 8.x-1.x
    Issue #1719572 by TR: Add condition:  Site (not) in maintenance mode
    
TR’s picture

Status: Needs work » Fixed

OK, those are the two current (expected) branch failures. Not related to this patch. Committed.

TR’s picture

Assigned: Unassigned » TR

Status: Fixed » Closed (fixed)

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