Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/177103

Change subject: Fix WMF post-merge recalc breaking when no donations
......................................................................

Fix WMF post-merge recalc breaking when no donations

Without the 'group by', this was trying to insert nulls

Change-Id: I3b1b0d8d8fb025120622298389d26c8dc4ee4769
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/03/177103/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 8ff0d52..476d1ea 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -1727,6 +1727,7 @@
             SELECT contact_id, MAX(receive_date) AS last_donation_date, 
SUM(total_amount) AS lifetime_usd_total
             FROM civicrm_contribution
             WHERE contact_id = $mainId
+            GROUP by contact_id
         ) ON DUPLICATE KEY UPDATE
             last_donation_date = VALUES(last_donation_date),
             lifetime_usd_total = VALUES(lifetime_usd_total)";

-- 
To view, visit https://gerrit.wikimedia.org/r/177103
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b1b0d8d8fb025120622298389d26c8dc4ee4769
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to