Closed (outdated)
Project:
Rules
Version:
6.x-1.4
Component:
Rules Core
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
26 Jan 2009 at 02:34 UTC
Updated:
17 Jun 2018 at 04:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
amitaibuCan't you already this info without the action, according to the event you are using i.e. if it's an Insert or Update operation ?
Comment #2
gordon commentedIf you have a look at my other post, I wanted an event which will be trigger on bother insert and update, so I could write a single rule to trigger when the node is published.
Comment #3
amitaibuI did comment on your other post #364173: Consolidate 'After saving new content' & 'After updating existing content' to 'Node is saved' :). Since fago said on my similar issue ;
I assume this will be wont-fixed as well.
Comment #4
fagoI like this condition, even without the combined event it's useful in several cases.
Consider passing the nodes from insert/update to a rule set or event "content is going to be saved", where the nid might be set or not.
@use case:
Really nice, perhaps you could share your rule here, once all patches are in? :)
http://drupal.org/node/298483
@code:
The condition should return a proper boolean, then !isset() is prefered instead of is_null(). Last I think it can be abbreviated to just
Then we should add a simple label callback for it, that replaces Content with the label of the used argument (%node).
Comment #5
fagoFYI http://drupal.org/node/367387
Comment #6
fagoI implemented the stuff I suggested in #4 and committed it.
Comment #8
gnindl commentedIf have have several events firing in the same hook, e. g. "Workflow state has changed" and "After updating existing content" in hook_nodeapi($op = 'update'), and changed the node in the first rule, the condition "Node is new" might not apply any more as the node has already been saved once. Therefore I suggest by comparing the $node->created and $node->updated timestamp as an additional possibility for identifying new nodes.
Comment #10
gnindl commentedIn my case it's better to patch the workflow module, please see http://drupal.org/node/1568864. Patch from comment #8 has a wrong logic and should be obsolete.
Does the rules module keep the $node->is_new flag after actions have modified a new node? In my opinion it should, otherwise subsequent events cannot properly interpret the node state..
Comment #11
tr commented