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.

CommentFileSizeAuthor
revision_log_rules.patch2.13 KBperusio
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klausi’s picture

Version: 6.x-1.2 » 6.x-1.x-dev
Component: Rules Core » Rules Engine
Status: Patch (to be ported) » Needs review

Status: Needs review » Needs work

The last submitted patch, revision_log_rules.patch, failed testing.

fago’s picture

sounds 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.

mitchell’s picture

Status: Needs work » Needs review

revision_log_rules.patch queued for re-testing.

mitchell’s picture

Title: Revision log automatic message for node related actions. » Support node revision log for node related actions
Category: task » feature
Status: Needs review » Needs work
mansspams’s picture

Is 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.

fago’s picture

>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.

perusio’s picture

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.

mansspams’s picture

Sorry 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...

WorldFallz’s picture

i 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?

WorldFallz’s picture

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...

fago’s picture

>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.

TR’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev
Component: Rules Engine » Rules Core
Issue summary: View changes

Drupal 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.