Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm making Rules integration for Revisioning. Rules is very powerful module, allowing to build very complex and powerful actions and behaviours without using single line of PHP. Currently Revisioning integrates with core Trigger module to provide core-style actions, but with Rules module Trigger becomes obsolete (actually I don't use Trigger at all).
Comment | File | Size | Author |
---|---|---|---|
#13 | revisioning-rules-rerolled.patch | 40.89 KB | crea |
#3 | revisioning-rules.patch | 41.59 KB | crea |
Comments
Comment #1
crea CreditAttribution: crea commentedComment #2
RdeBoerI also believe Rules has great potential.
Look forward to your thoughts in this area, crea.
Rik
Comment #3
crea CreditAttribution: crea commented"Release often, release early" as it they say...
So here comes first version of patch. Changes are very serious, and there can be bugs (actually i'm sure there are), so please review and test carefully. Rules stuff is complex so it would probably take ages for me alone to test it deeply enough, huh.
Setting to "critical" as this patch is big enough and it would be hard to reroll it every time against each dev version of Revisioning, if it doesn't get committed first.
Patch summary:
This is done via checkbox in "admin/settings/revisioning". Enabled by default, ofcourse.
So there can be implemented other ways of alerting user (via template variable or custom block).
That code is slowly shaping up to be independant (so we could have module like RevisionAPI and Revisioning could be just UI module that uses API functions)
Bug reports and Rules integration improvement ideas (new conditions, actions, events etc) are welcome.
Comment #4
crea CreditAttribution: crea commentedComment #5
RdeBoerHi crea,
Really appreciate all the time you're putting into this. But as you suggested yourself let's not get ahead of ourselves and put patch on top of patch as it becomes really hard to merge.
First things first. Both Module Grants and Revisioning have had their development versions mature for several weeks now with most of the issues ironed out, so I feel confident to make official releases of those this week.
Then, returning to new development...
I do like the idea of Rules integration and am happy to pursue it, but I feel a few other issues/patches are perhaps higher priority, eg:
o #509552: "View Revisions" Permission does not descriminate by User Role
o #513078: Flexible revision permissions.
o #490580: 'access unpublished page/story/blog content' set of permissions
o #492414: Tab stickiness (remember tab selection)
and maybe also #505708: Set destination for revisioning links.
Then I need to update the documentation too.
I may be able to do some of the refactoring work you've suggested as part of the work required for the above.
Small steps....
Rik
Comment #6
crea CreditAttribution: crea commentedWell you could commit this to new experimental 3.x branch so atleast some brave people start testing it.
Comment #7
RdeBoerHi crea,
Yes I could and I might, although I'm not a fan of maintaining two branches and move bug fixes across etc...
For the moment I have created official releases of Module Grants and Revisioning and updated the doco, which frees me up to do some of things mentioned in #5, as well as your patch.
Are you confident that the patch doesn't take away any functionality?
And what are some of the Rules-based end-user features that you feel Revisioning will be able to offer?
Rik
Comment #8
crea CreditAttribution: crea commentedPatch shouldn't take away anything, and if it does it's bug cause I didn't have such intention.
If you want example for Rules: when revision is going to be deleted, check if acting user is moderator, and if he is not, copy revision somewhere. And that kind of "rule" could possible without writing code. Actually, possibilities are almost endless: it only depends on how creative we gonna be with "actions", "events" and "conditions" - that's why I asked everyone to share ideas.
Comment #9
crea CreditAttribution: crea commentedIf you have problems with merging patches, I recommend using Git. Actually i'm newb to all VCS stuff and was amazed when Git merged several branches (with different features developed) without any intervention. It's such a timesaver, great tool.
Comment #10
RdeBoerThanks for the tips!
Will check out Git ASAP.
Rik
Comment #11
kesmeby CreditAttribution: kesmeby commentedSweet manna from heaven!
I've been wishing Revisioning worked with Rules for months now while I bog down my development site with one cumbersome Workflow after another. Ugh!
Great work on this module by the way. It really adds some important features.
Thanks.
Comment #12
RdeBoer@crea,
Do you still have the source belonging to the patch you created in comment #4 ?
If so, could you please generate another patch against the HEAD, as I'm not sure against which version of Revisioning your patch was created and some bug fixes had to go in since.
@kesmeby, #11
Thanks for your support!
Rik
Comment #13
crea CreditAttribution: crea commentedTry this patch. Rerolled against latest dev
Comment #14
RdeBoerThanks crea -- give me 24 hours or so to evaluate.
Then I'll make the current development snapshot official (it's soon, but it's a low risk change) and will check the patch into the repository for the next snapshot.
Comment #15
RdeBoerOk crea,
Your patch is in as HEAD.
The only changes I made are formatting changes to satisfy the Code review module.
Rik
Comment #16
crea CreditAttribution: crea commentedSince this is now in CVS, I mark this as fixed. For bugs and feature requests regarding Rules integration new issues should be opened.