I got a "flag A". this flag can be flagged with "flag B".
I would like to send an email via the Rules module to the flagging-user of flag A, when flag A has been flagged with flag B.
My problem is I can't find a replacement token for flagging-user of flag A.
I get a lot of tokens for flag a except a token to address the flagging user of flag a.
Available Tokens for Flagged-Flag:
[flagged-flagging:date]
Flagging date The date an item was flagged.
[flagged-flagging:flag-freundschaftsspiel-bestaetigen-count]
Freundschaftsspiel bestätigen flag count Gesamtzahl der Kennzeichnungen für die Kennzeichnung Freundschaftsspiel bestätigen
[flagged-flagging:flag-freundschaftsspiel-bestaetigen-link]
Freundschaftsspiel bestätigen flag link Flag/unflag link for Freundschaftsspiel bestätigen
[flagged-flagging:original]
Original flagging The original flagging data if the flagging is being updated or saved.
[flagged-flagging:field-fs-mannschaft]
Mannschaft Feld "field_fs_mannschaft".
[flagged-flagging:field-flag-fs-trikotfarbe]
Trikotfarbe Feld "field_flag_fs_trikotfarbe".
[flagged-flagging:og-membership]
OG memberships A list of all OG memberships of the flagging entity.
[flagged-flagging:og-membership--1]
Aktiv OG membership A list of all OG memberships of the flagging entity with Aktiv state.
[flagged-flagging:og-membership--2]
Ausstehend OG membership A list of all OG memberships of the flagging entity with Ausstehend state.
[flagged-flagging:og-membership--3]
Gesperrt OG membership A list of all OG memberships of the flagging entity with Gesperrt state.
[flagged-flagging:field-fs-mannschaft--og-membership]
OG membership from field Mannschaft A list of all OG memberships registered in field Mannschaft.
[flagged-flagging:field-fs-mannschaft--og-membership--1]
Aktiv OG memberships from field Mannschaft A list of all OG memberships with Aktiv registered in field Mannschaft.
[flagged-flagging:field-fs-mannschaft--og-membership--2]
Ausstehend OG memberships from field Mannschaft A list of all OG memberships with Ausstehend registered in field Mannschaft.
[flagged-flagging:field-fs-mannschaft--og-membership--3]
Gesperrt OG memberships from field Mannschaft A list of all OG memberships with Gesperrt registered in field Mannschaft.
[flagged-flagging:flag-freundschaftsspiel-bestaetigen]
Whether the entity is flagged with flag freundschaftsspiel_bestaetigen Whether the entity is flagged with flag freundschaftsspiel_bestaetigen.
[flagged-flagging:field_fs_mannschaft]
Mannschaft Field Entity Reference.
[flagged-flagging:field_flag_fs_trikotfarbe]
Trikotfarbe Field Referenz auf Taxonomy-Begriffe.
This is the export of the rule:
{ "rules_freundschaftsspiel_best_tigen" : {
"LABEL" : "Freundschaftsspiel best\u00e4tigen",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules", "rules_i18n", "flag" ],
"ON" : { "flag_flagged_freundschaftsspiel_bestaetigen" : [] },
"IF" : [
{ "entity_has_field" : { "entity" : [ "flagged-flagging" ], "field" : "field_fs_mannschaft" } }
],
"DO" : [
{ "mail" : {
"to" : "[flagged-flagging-user:mail]",
"subject" : "test",
"message" : "test \r\n[flagging-user:name]",
"from" : "[site:mail]",
"language" : [ "flagging-user:language" ]
}
}
]
}
}
The token used in the mail action "to" is just an exmaple. There is just no token for the mail of the user of the flagged flag.
The only mail token available is the one of the flagging-user:mail. That would be the flagging-user of flag B.
I guess I would need something like flagged-flagging:flagging-user:mail.
Is there a way I could send an email to the user of flag A that has been flagged by flag B?
The Rule should do as follows:
When a flag ("A" or the same as "Freundschaftsspiel") is flagged by flag "Freundschaftsspiel bestaetigen" then send an email to the user (flagging-user) whos flag has been flagged by "Freundschaftsspiel bestaetigen".
The only condition right now is the one you asked me to add in your first comment. Add a field that is contained in the original flag (Flag A or Freundschaftsspiel).
Freundschaftsspiel is a "friendly game".
The flagged-flagging-user is just a construction of me. It is not found in the replacement patterns.
But some kind like this would be the token a need. As shown above all other data of flag "A" is available, ecept the "author" or flagging-user.
To explain the whole thought behind all this.
A user creates an entity "Freundschaftsspiel" with Date and Team data. All other others that are interested in competing against this team in a friendly match can flag this entity with flag A or "Freundschaftsspiel" flag.
The author of the entity "Freundschaftsspiel" gets a list of interests in a view.
He then flags one of these interests with flag B or "Freundschaftsspiel bestaetigen".
That is when the rule should be fired.