When adding a condition in Rules, the options provided by Revisioning are stuck out on their own and do not work correctly when trying to specify a type of revision.

The patch attached adapts Rules' handling of node content type selection.

There is also a wrapping function to prevent passing a parameter to revisioning_revision_states() that it can't handle.

Comments

lazysoundsystem’s picture

Revised patch to handle changes in revisioning_condition_revision_is().

rdeboer’s picture

Thanks so much for the patch!
Will check in soon.
Rik

rdeboer’s picture

Assigned: Unassigned » rdeboer
Status: Active » Fixed

Committed to master branch. Will be in 7.x-1.3 release.
Thanks again, lazysoundsystem!
Rik

jp.stacey’s picture

This patch doesn't work with drush make: alternative without git prefixes attached.

rdeboer’s picture

Thanks jp,
For those not familiar with patches, just check out the master branch, as the patch has been committed to Git.
Rik

lazysoundsystem’s picture

Thanks for committing that, Rik.

Not quite worth its own issue and patch, there is another related change for revisioning_rules_action_info() where:

  $default = array(
    'module' => 'Revisioning',
  );

should be:

  $default = array(
    'group' => 'Revisioning',
  );

to make the actions show up in the right place in the dropdown.

Thanks again.

lazysoundsystem’s picture

And while we're at it...

This, from revisioning_rules_event_info():

  $default = array(
    'module' => 'Revisioning',
    'arguments' =>  _revisioning_rules_event_arguments(),
    'redirect' => TRUE,
  );

needs changing to:

  $default = array(
    'group' => 'Revisioning',
    'arguments' =>  _revisioning_rules_event_arguments(),
    'redirect' => TRUE,
  );
lazysoundsystem’s picture

One last thing...

Checking the condition in revisioning_condition_revision_is() gives errors if the revision info isn't already set.

This patch includes a call to revisioning_set_node_revision_info() and the two changes from 'module' to 'group' from the last two comments.

(Just to be clear, as the earlier patch is already committed, those changes are not repeated in this patch.)

lazysoundsystem’s picture

And with apologies for the noise, here's a single patch with all the above changes included, made against branch 7.x-1.2.

Status: Fixed » Closed (fixed)

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

rdeboer’s picture

Status: Closed (fixed) » Patch (to be ported)

Have not committed patches since #3, yet

rdeboer’s picture

Status: Patch (to be ported) » Fixed

Checked in. Sorry for the delay.
See http://drupal.org/node/407994/committers.

Status: Fixed » Closed (fixed)

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