If User # does XYZ email User ##
| Project: | Rules |
| Version: | 6.x-1.0 |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
I would like to create a couple of rules for the site admins who are developing a site (ie pre-launch).
So when Admin 1 adds or edits nodes on the site (or whatever else I learn to create a useful rule for) I would like Admin 2 to be notified of it and vice versa.
So far I have been able to select the role as being Admin but this means that Admin 1 also receives an email when they add or update their own nodes too and thats a bit of a pain.
I have asked in Groups http://groups.drupal.org/node/23023 about this and another rules question but nothing has been forthcoming yet.
Would really appreciate being pointed in the right direction, and even more if someone could spell it out step by step.
T.I.A.

#1
[Before going into how to do this with rules, you may want to check out the module "Notification" that does this out-of-the-box. It's intended to notify people of changes in content. If you want to use Rules to do this in a more custom manner, read on]
Perhaps you could separate this into two parts:
Part 1:A triggered rule, from an event (say a new node) and run whatever conditions you want. The action is to run a rule-set called "notify admins"
Part 2: Create a rule set with two rules in it, "notify admin" rule for each of the admins
Rule (a) Admin 1 notify
Rule (b) Admin 2 notify
Now, presumably this would notify both admins whenever anyone does anything. So you add a condition in each as follows:
Rule (a) - Text comparison - (negate) compare the acting user's email with the admin1 email. If matches, then the admin should not be notified since they are the one who made the change. If they don't match, that means someone else made the change, so notify them
Rule (b) - Compare acting user to admin2 email and again only notify if they do not match.
This way you could generalize this with multiple admins.
#2
aantonop
I just wanted to let you know that I really appreciate you having replied and will try to do what you have suggested just as soon as I wrap my head around the learning curve :) (or bow out to use Notifications!!).
I had never know about 'Textual Comparisons', 'negate', nor how to add 'Rules' to 'Rule Sets', am still a bit confused with what an 'Argument' is, and will have to work out the token for 'Acting User' but with your advice I am on the right track and will plug away at it.
Thanks again.
#3
You're welcome. As you try it, if you get lost, ask more specific questions. You now have the roadmap...
#4
thanks for helping :)
#5
Automatically closed -- issue fixed for 2 weeks with no activity.