From a252e894221243686c1ff08ebe7f74455747aa33 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Wed, 26 Oct 2022 08:47:27 +1100 Subject: [PATCH] [REF] Fix importing contributions with a acampaign id rather than a title --- CRM/Import/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Import/Parser.php b/CRM/Import/Parser.php index dd5d6cf656..8c1f632953 100644 --- a/CRM/Import/Parser.php +++ b/CRM/Import/Parser.php @@ -1632,7 +1632,7 @@ abstract class CRM_Import_Parser implements UserJobInterface { } if ($fieldMetadata['name'] === 'campaign_id') { if (!isset(Civi::$statics[__CLASS__][$fieldName][$importedValue])) { - $campaign = Campaign::get()->addClause('OR', ['title', '=', $importedValue], ['name', '=', $importedValue])->addSelect('id')->execute()->first(); + $campaign = Campaign::get()->addClause('OR', ['title', '=', $importedValue], ['name', '=', $importedValue], ['id', '=', $importedValue])->addSelect('id')->execute()->first(); Civi::$statics[__CLASS__][$fieldName][$importedValue] = $campaign['id'] ?? FALSE; } return Civi::$statics[__CLASS__][$fieldName][$importedValue] ?? 'invalid_import_value'; -- 2.25.1