jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/367806 )

Change subject: Add country to c_t rows created during imports
......................................................................


Add country to c_t rows created during imports

...but only when it's valid.

Bug: T171658
Change-Id: If685b1e82a5f5a3f01367e908bb2834a73f27133
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Mepps: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index e817af0..81f2be6 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -1810,6 +1810,12 @@
                 'anonymous' => $anonymous,
                 'ts' => wmf_common_date_unix_to_sql( $msg['date'] )
             );
+            if (
+                !empty( $msg['country'] ) &&
+                CRM_Core_PseudoConstant::countryIsoCode( $msg['country'] ) !== 
null
+            ) {
+                $tracking['country'] = $msg['country'];
+            }
             $contribution_tracking_id = 
wmf_civicrm_insert_contribution_tracking( $tracking );
             watchdog( 'wmf_civicrm', 'Newly inserted contribution tracking id: 
@id', array( '@id' => $contribution_tracking_id ), WATCHDOG_DEBUG );
             $msg['contribution_tracking_id'] = $contribution_tracking_id;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If685b1e82a5f5a3f01367e908bb2834a73f27133
Gerrit-PatchSet: 7
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Eileen <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Mepps <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to