Awight has submitted this change and it was merged.
Change subject: Add 'Do not solicit' contacts to suppression list
......................................................................
Add 'Do not solicit' contacts to suppression list
Depends on change I2a91116fff0f6a48f0bc7a7e96c5ef73e4cc89a3.
Uses new wmf_donor.do_not_solicit column.
Change-Id: I19b7ddd6387aa145408412b9cef757e1ece138c4
---
M silverpop_export/update_table.sql
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Awight: Looks good to me, approved
diff --git a/silverpop_export/update_table.sql
b/silverpop_export/update_table.sql
index 2a8f548..7709b5a 100755
--- a/silverpop_export/update_table.sql
+++ b/silverpop_export/update_table.sql
@@ -64,9 +64,10 @@
SELECT
e.id, e.contact_id, e.email, c.first_name, c.last_name,
IF(SUBSTRING(c.preferred_language, 1, 1) = '_', 'en',
SUBSTRING(c.preferred_language, 1, 2)),
- (c.is_opt_out OR c.do_not_email OR e.on_hold)
+ (c.is_opt_out OR c.do_not_email OR e.on_hold OR d.do_not_solicit)
FROM civicrm.civicrm_email e
LEFT JOIN civicrm.civicrm_contact c ON e.contact_id = c.id
+ LEFT JOIN civicrm.wmf_donor d ON d.entity_id = c.id
WHERE
e.email IS NOT NULL AND e.email != '';
--
To view, visit https://gerrit.wikimedia.org/r/171853
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I19b7ddd6387aa145408412b9cef757e1ece138c4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: deploy
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits