Awight has uploaded a new change for review.
https://gerrit.wikimedia.org/r/280784
Change subject: is_deleted is another way to opt out ;)
......................................................................
is_deleted is another way to opt out ;)
Bug: T130660
Change-Id: Ia0a5ea1b5e95a0c3d392c388c4100070373386f9
---
M silverpop_export/update_table.sql
1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools
refs/changes/84/280784/1
diff --git a/silverpop_export/update_table.sql
b/silverpop_export/update_table.sql
index 1cbceb1..a874854 100755
--- a/silverpop_export/update_table.sql
+++ b/silverpop_export/update_table.sql
@@ -58,13 +58,12 @@
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 OR COALESCE(d.do_not_solicit,
0))
+ (c.is_opt_out OR c.do_not_email OR e.on_hold OR COALESCE(d.do_not_solicit,
0) OR c.is_deleted)
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 != ''
- AND c.is_deleted = 0;
+ e.email IS NOT NULL AND e.email != '';
-- Find the latest donation for each email address. Ordering by
-- recieve_date and total_amount descending should always insert
--
To view, visit https://gerrit.wikimedia.org/r/280784
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0a5ea1b5e95a0c3d392c388c4100070373386f9
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits