Active
Project:
Revisioning
Version:
7.x-1.4
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
8 May 2012 at 08:57 UTC
Updated:
7 Jun 2013 at 06:32 UTC
Jump to comment: Most recent file
Hi, I'd like to trigger a rule when a user of a certain role creates a new revision.
I hope this issue belongs here, if not I'll move it to Rules
This worked in D6 but in D7 the token node:author only checks the author of the original node and not the new revision.
So the Condition 'User has Role(s)' does not work.
Strangely this Condition offers the choice between node:author and node:source:author, suggesting that the former is the current revision but there seems to be no difference.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | revision tokens.jpg | 139.11 KB | rdeboer |
Comments
Comment #1
rdeboerSorry this slipped off my radar.
Can someone please verify if this is still an issue with the latest versions of Rules (7.x-2.3) and Revisioning 7.x-1.x-dev?
Rik
Comment #2
rdeboerNote: see also #1964296: Availability of Revisioning tokens in Rules
Comment #3
rdeboerYou need to distinguish between the author of the node, which is and will always remain the creator (of the first revision) of the node and the editor/author of the (latest) revision.
Token/Replacement Pattern support has been brushed up in the latest version of Revisioning 7.x-1.x-dev.
Comment #4
rdeboerAttached a screenshot of the Revisioning-related tokens available as Replacement Patterns in Rules.

Comment #5
rdeboerComment #6
rdeboerReopening as I've misread the original issue, which is not so much about replacement patters, but about applying the "User has role" condition to the author/editor of the newly created revision (as opposed to the author of the initial revision).
This is not quite fixed yet. I can't seem to get any event arguments to become available in the evaluation of the condition. They show up in the UI, but the objects don't in the code...
Anyone any ideas?
PS: as a workaround, couldn't you use the role of the "Acting user" instead?
Comment #7
arrubiu commentedI've this problem with token also in actions.
I'v tried to create a rule with action "Pending revision is published" and a simple action "set message on the site" with text "Thanks [revision:author"].
The rule returns an error about missing of "node" argument.
Comment #8
sgurley314 commentedI'm confused about the status of this issue. Is it a bug with the code or an error in configuration on the user's part?
I have a similar/the same problem in my system. My site has a list of approvers of content (about 5 people - any of which can approve). I would like them all to get an email when a revision is published and ready for review. Nothing I do works. Either I get an error as described above or it runs error free and no email is sent. Any ideas?
Comment #9
sgurley314 commentedI should add - the error I get is "Revisioning: could not evaluate rule condition -- node variable missing"
Comment #10
rdeboerThe code is incomplete. See comment #6: https://drupal.org/node/1566848#comment-7296838
Anyone want to chip in?