By default, email to role(s) will send an email to users in any of the groups listed. This patch lets you set it so that it will send email to only the users in ALL the groups selected. The patch needs work because it will work on SQLite and pgsql, but not MySQL. I don't imagine it will be much work to come up with a cross platform query but I don't have time right now.

Comments

binford2k’s picture

StatusFileSize
new2.67 KB
mitchell’s picture

Component: Provided Rules integration » Rules Core
Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1393014-email_to_roles_intersection.patch, failed testing.

mitchell’s picture

mitchell’s picture

Version: 7.x-2.0 » 7.x-2.x-dev

>it will work on SQLite and pgsql, but not MySQL. I don't imagine it will be much work to come up with a cross platform query

Please see the Database API for that. And here's the api docs: http://api.drupal.org/api/drupal/includes!database!database.inc/group/da...

mitchell’s picture

Status: Needs work » Closed (won't fix)

I would prefer to take another approach described in #1699594: Remove Action: Send mail to all users of a specific role group(s). If it proves to be an undesirable direction, then I think we should reopen this issue. I do want to build out this functionality, but in think this current approach is based on multiple levels of code duplication. See also, #1699588: Set-theoretic arithmetic in conditions and actions.