Hello everyone!

First off, thanks for such a great module. I was working with D5 and workflow_ng for over a year now. So now it's time for me to give D6 a try and to implement all the features I built in D5 into the new system.

And here we go: I have a little task management built with CCK and Comment CCK (for altering the status of a task by writing a comment). What I want is to send an email if the state of my task has changed (by editing the task-node itself or writing a comment and changing the state this way).
I played around a little bit with the Rules Forms Support and am missing one feature: I just want to fire the action if the content of the cck-field "state" has CHANGED when the user saves the form.

There exists a module for D5 that offers exactly this kind of check-up: http://drupal.org/project/form_changes

Any help is appreciated!

Regards, Freddy

CommentFileSizeAuthor
#1 issue_comment_rules.txt6.11 KBmitchell

Comments

mitchell’s picture

StatusFileSize
new6.11 KB

I am working on a system just like this and tried to do it with comment-cck as well. I forget why exactly, but I found it to be impossible (note: I never tried with forms support). Then, I tried to implement this using the node-comment module, but there was no way to load the parent, see #481480: Node-comment target as token.

So, now I use full nodes as comments with an an issue node type and an issue-comment node type that references it. They both have nearly the same fields so that the commenter's form has the values available as well. The issue-comment form is displayed on issues at the bottom of the page using the form_block module, and I use this snippet for the default nodereference value:

$temp = explode('/', $_SERVER['REQUEST_URI']);
return array(
  array('nid' => (int) end($temp)),
);

There's a lot missing in this, but since I didn't use forms support, my implementation can probably be greatly improved.

freddyseubert’s picture

thanks for your reply!!

This solution would work for me if there wasn't the need for forum and og_forum... and if I'm right, these two do not work together with node-comments. If not, please correct me.

Any other way you can think of to solve my problem?

And even if it would work fo me the way you described, I think the kind of check-up I mentioned above would be a useful improvement to the Rules module.

mitchell’s picture

>> This solution would work for me if there wasn't the need for forum and og_forum... and if I'm right, these two do not work together with node-comments. If not, please correct me.

You may be able to use nodecomment v1 with forum and og_forum if you also use nodeforum. Nodecomment v2 works alongside comment, and I am pretty sure forum and og_forum will work with it as well.

>>And even if it would work fo me the way you described, I think the kind of check-up I mentioned above would be a useful improvement to the Rules module.

Rules has a condition when field values change in its CCK integration called 'field has changed'. It won't help here because it only works with fields on the same node, and therefore it would only allow rules to respond when the node is edited directly.

>>'Writing a comment and changing the state'

This requires rules be able to use both the values from the comment being submitted and the related node. You can see in the code attached above how the values are compared using the 'textual comparison' condition. I used nodereference to access the parent node, but nodecomment might also work: #481480: Node-comment target as token.

freddyseubert’s picture

Status: Active » Postponed

Well, thanks again for your comment.
After playing around for some hours now, I decided to live with workflow... at the moment not really userfriendly, because the changes to the workflow state have to be made on a seperate tab, but it works. If I have spare time in the next month, I'll try your approach.

So long :)

klausi’s picture

Status: Postponed » Fixed

Reopen if still an issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.