Hi,
I was missing a generic integration of some extended rules arguments like
- "node author" in context of node flags
- "comment author" in context of comment flags
- "comment node author" in context of comment flags
to apply some of the multiple user/node actions, delivered by other modules.
Issue #688318: Send an email with Rules to node author when flagged addressed the "node author" argument in a specific usage. But the solution does not help in my case.
I added a short patch against 6.x-2.0-beta3, which extends flag rules integration by the mentioned arguments in a generic way to achieve maximal flexiblity.
Comments
Comment #1
YK85 commentedsubscribing
Comment #2
TS79 commentedsry, patch was against 6.x-1.3 version
Comment #3
TS79 commentedComment #4
chuckbar77 commentedsubscribing
Comment #5
mooffie commentedAmitai? Do you happen to be reading this? I'd like to know your thoughts on this.
On the one hand, I don't like this patch very much. I had the impression Flag already does the elegant thing, by exposing just (1) the flagging user and (2) the flagged item.
On the other hand, I just had a look at Rules and I see, for example, that when one posts a comment, the node author too is exposed. So it seems we too should follow this convention and expose everything we can (that is, the node author + comment author).
I'm curious. What does this patch make possible that wasn't possible before?
Comment #6
TS79 commented... sense: using same rules actions, where the user-object is required as input. e.g. send a (heartbeat) message to the author of the node/comment, if someone flags it...
Comment #7
quicksketchFago is now a Flag module maintainer, maybe he'll have time to review this patch? I tend to stay out of the Rules integration.
Comment #8
fago@quicksketch: thanks for the pointer!
@issue:
Looks like a good addition to me. Fortunately this works with rules2 in D7 already, so we only have to care about 6.x here. Though I think we need a version for flag-2.x too if it should go into 1.x.
This should be a single t().
@testers:
Please test using all added variables and report whether it properly works for you!
Comment #9
TS79 commentedhappy new year of issue lifetime
Comment #10
chrislabeard commentedI've tried this patch, however I still don't have the flagged content's author as an option. And it was the 2.x dev patch
Thanks,
Chris
Comment #11
TS79 commented@chrislabeard: did you clear the cache? I have 2.x dev not running, but can't imagine, why this should not work.
Comment #12
chrislabeard commentedI've cleared my cache but just can't seem to get it to show up as a argument value.
Thanks,
Chris
Comment #13
TS79 commentedsry, that it lasts so long, but I did not have any test env with flags 2.x dev until now.
now i created one and if you
1. create a node-flag [myflag]
2. create a rule for trigger "Node has been flagged under "[myflag]""
3. add the action System::"Send E-Mail to user"
You have two user to in selection:
- flagging user
- flagged content author
So all seems to work for flags 2.x dev (and Rules 6.x-1.3, which runs in my env) too.
@chrislabeard: don't know, whats wrong in your installation.
Comment #14
fagoCode looks good to me now, there are some whitespace issues though:
Trailing whitespaces.
Trailing whitespaces.
Trailing whitespaces and missing comma.
Comment #15
TS79 commentedComment #16
fagothanks, committed to 6.x-2.x and 6.x-1.x.
Comment #17
quicksketchExcellent, thanks fago.
Comment #19
liliplanet commentedDiscover that [flagged-node:author:mail] works (Drupal 7)