I'm unsure whether this is a bug, support request or a feature request, so apologies if I've got it wrong.
I want to set up a simple rule which sends an email to the author of a revision when a certain field has changed (to provide some basic workflow functionality). I've got the rule set up to fire when I want it to using the 'Before saving content event', and it's working as I want it to, except that I cannot access the tokens for revision authors, so can't send my email to the author of the pending revision.
The only way to get access to these tokens seems to be to set up the rule to react on one of the revisioning events, e.g Content has been reverted to revision, Content has been unpublished, Content has been reverted to revision etc. However, none of these are suitable. I just need a latest revision has been updated or similar.
Is this something that could or should be possible?
Thanks,
Mary
Comments
Comment #1
rdeboerThanks Mary,
Yes, if I remember correctly the revision tokens will only be available when Rules loads a revision/Revisioning context.
So that means I'll have to add an event "latest revision has been updated".
I hope to attend to this soon.
Or if anyone wants to beat me to it, I'll gladly accept the patch!
Rik
Comment #2
mpelder commentedThanks Rik. Don't have the skills to provide it myself yet I'm afraid, but I'll test it!
I'm still trying to get my head around rules, but I guess we might want something like 'before saving latest revision' as well perhaps. For example, my rule is checking to see if a particular field has changed since the last save and I think that that will only work if the rule is triggered before the save.
Comment #3
rdeboerAdded "Revision has been updated" Rules event and checked into Git.
Available in development snapshots dated 3 Mar 2012 or later.
Will also be available in 7.x-1.4 when released.
Use the [node:...] tokens for the pending revision just saved. Use the [current-revision:...] tokens for the currently published revision.
Rik