To reduce the number of rules for a simple twitter announcement of a node, so I didn't need 2 sets of rules, but only 1 for both the insert and update events.

This adds a new event node_save which is called after the insert/update events so that is will be called when ever node_save is called.

This has meant that instead of 2 triggered rules, I only need to use 1.

CommentFileSizeAuthor
rules_event_node_saved.patch1.52 KBgordon

Comments

amitaibu’s picture

Status: Needs review » Closed (duplicate)

#353168: Add "After saving a new or existing content' event - interesting enough is that in the almost same time we both came with the same solution ;)

gordon’s picture

Status: Closed (duplicate) » Needs review

I am setting this back since the other has been set as don't fix.

fago’s picture

Status: Needs review » Needs work

I still think it would be the better way to allow the assignment to multiple events to one rule in the long way.
So I'll look to get this implemented asap, if it's too complicated to implement, we still can fallback to that approach.

So I set the issue to "needs work" for now. If you want speed that up and help, I could provide my thoughts on how to implement that.

mitchell’s picture

Title: Add new event to node for when node is saved. » Consolidate 'After saving new content' & 'After updating existing content' to 'Node is saved'
Version: 6.x-1.0-beta3 » 6.x-1.x-dev

Also marked #353168: Add "After saving a new or existing content' event as duplicate of this issue.

fago’s picture

Maybe we should introduce a feature "Custom event", which makes it possible to add new events on the fly? So this won't be needed, however it somehow overlaps with rule sets. I need to think more about that.

mitchell’s picture

gilcpd’s picture

Hey guys

Can someone help me to apply this patch?

I saved the patch on the root of my drupal site : C:\xampp\htdocs\mysite.

I use Cygwin and im typing the following command: c:\cygwin\bin\patch.exe -p0 < C:\xampp\htdocs\mysite\rules_event_node_saved.patch

But is keeps giving me an error that cant find the file to patch "Can't find file to patch at input line 5" .

What am I doing wrong?

Thanks in advance.

Gill

mitchell’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev
Component: Provided module integration » Rules Engine
Assigned: gordon » Unassigned

Marked #479434: Adding node triggers both [add node] and [update node] as a duplicate.

This appears to be a highly recurring issue. If there was a priority between normal and critical, I'd put it there.

giorgio79’s picture

Priority: Normal » Major
fago’s picture

In 2.x we can assign a rule to both events at the same time, so I suppose this issue is fixed then?

fago’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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

jday’s picture

will the ability to assign a rule to both events be back-ported to 6?