I want to be able send an email to to the node author when a node is flagged. However, when I set the trigger to "node is flagged" and then go to add the "send a mail to a user" action, the only recipient option is "flagging user" when I hope to see "node author" as well.
Comments
Comment #1
capellicI discovered a work around for this. Setup a rule that is triggered by "Content is going to be saved." Then add a condition with regard to the flag.
UPATED: The problem with this approach is that the node author will receive an email notification any time a the node is saved and the flagged condition is met which is a problem on my site.
Comment #2
quicksketchYou can do this already with the normal Trigger module I believe (though I'm not sure I'd recommend using Trigger). I don't use or support Rules in any way, so this will only happen if a patch is provided.
Comment #3
quicksketchComment #4
capellicShould I have submitted this issue to the Rules queue instead?
Comment #5
quicksketchNo the Rules integration with Flag is included with Flag module, so this is the right place. It's just that community members are supporting the Rules integration, not the maintainer, so it may take a while longer to get implemented. Amitaibu comes around pretty regularly and fixes Rules issues.
Comment #6
vinoth.3v commented+1 for this feature
Comment #7
rburgundy commented+1 subscribing
Comment #8
robby.smith commented+1 for further development of rules integration
Comment #9
dman commentedI think this is what I'm seeing too.
Use case:
- A 'flag' that indicates "Breaking news" (which is used for a special front page promo)
- When the editor "flags" an item as "breaking" I also use rules to schedule a later "demotion" that will unflag it. This is a 'temporary' flag.
It seems I've got all the right tools in front of me (awesome in general!) BUT:
- Using the flag checkbox on the node edit form does NOT trigger the "A node has been flagged, under "Breaking News"" event.
- Using the widget DOES (but does not trigger the "node is being updated" event)
So I've now got two triggers. (flagged or (updated and flag set)) Both of which point to the same "Schedule a demotion" ruleset+action.
So this is sorta working for me. now. I think.
The thing is, I feel that updating a node, through node edit, with a flag change, should be expected to trigger the 'is flagged' or 'is unflagged' events.
Is this just currently overlooked/missing functionality, a feature request, or am I doing something wrong?
Comment #10
vinoth.3v commentedIt seems another bug
Comment #11
amitaibuIn order to send email to the node author you can use the action "Load a user account" and under "User ID" field you have two options:
1) If you use token you can write
[node:author-uid]2) If you have core's PHP filter enabled you can write
<?php return $node->uid ?>After that, you can select the action "Send email to user", and select the newly loaded user.
@quicksketch, you should really start using Rules - it's great :)
Comment #12
vinoth.3v commentedThank you very much Amitaibu
optionally we can use "load node author" action too
but we have to find a way to check conditions based on the node author!!!
Comment #14
capellic@Amitaibu ------>>> Thanks so much! Works Great!
Comment #15
TS79 commentedsee #912926: Rules integration with extended arguments for a more generic solution