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.
This patch implements an action that creates an automatic revision log message. It's useful for creating an history of all the states that a given node goes through. For example when in publishing workflow it passes from 'reviewed' to 'published'.
It replicates in a lesser degree the 'per entity logging' feature of workflow_ng.
Comment | File | Size | Author |
---|---|---|---|
revision_log_rules.patch | 2.13 KB | perusio | |
Comments
Comment #1
klausiComment #3
fagosounds cool. Is the log recorded even if there is no new revision created? If not, it won't work right for that case and we should make that clear in the help text. Also an action to enable the revision flag would make sense then.
Comment #4
mitchell CreditAttribution: mitchell commentedrevision_log_rules.patch queued for re-testing.
Comment #5
mitchell CreditAttribution: mitchell commentedComment #6
mansspams CreditAttribution: mansspams commentedIs the log recorded even if there is no new revision created?
Yes. I was looking for a way to add flag time and flag user to current revision log and this action does not save new revision.
Comment #7
fago>Is the log recorded even if there is no new revision created?
No, it isn't.
FYI, writing the log is already supported for 7.x-2.x.
Comment #8
perusio CreditAttribution: perusio commentedThat's cool. I've been sort of MIA regarding this issue. What I'm really looking for is replicating the per entity logging that existed back in workflow_ng. I have in my TODO list to use the message module for that. It seems to be the more appropriate approach.
Comment #9
mansspams CreditAttribution: mansspams commentedSorry for my stupidity in #6, I was typing faster than thinking. Indeed its not saved.
Maybe this patch could apply to more actions, like flagging too, I know its not cool to re-save node after each flagging, but I am working here on some project, where flagging node is sensitive and MUST be logged somewhere. And better in one place with field changes, since workflow is important too. Basically workflow is - user changes value of field and only AFTER that node can be flagged and only AFTER that another value can be changed. If I could save revision with flagging information it would create good reference on who did/changed what and when, but then again its stupid because reverting revision would not unflag node...
Well, I am off to message module for now probably...
Comment #10
WorldFallz CreditAttribution: WorldFallz commentedi need to solve this for a d6 site I'm working on. What's the best way forward to get something committed for d6-- backport the d7 code (i've not had a chance to look at it yet) or update the original patch?
Comment #11
WorldFallz CreditAttribution: WorldFallz commentedi'm still finding my way around d7, but I can't find any revisions support in rules with the current 7.x-2.x-dev...
Comment #12
fago>That's cool. I've been sort of MIA regarding this issue. What I'm really looking for is replicating the per entity logging that existed back in workflow_ng. I have in my TODO list to use the message module for that. It seems to be the more appropriate approach.
Yep, the message module provides exactly what "per entity logging" did in d5 - but better as it is based upon fields.
>i'm still finding my way around d7, but I can't find any revisions support in rules with the current 7.x-2.x-dev...
It works, just with the node log property. Write into it with the "set data value" action and it will be respected when a new revision is created. I think, I even had a use-case using it in my thesis.
Comment #13
TR CreditAttribution: TR commentedDrupal 6 end-of-life was more than two years ago - there will be no new feature in D6 Rules, and D6 Rules is no longer supported.
That said, this could go into Rules for D7 or D8 if someone is willing to contribute code or fund the development of this feature.