From 87c28cdd74bc99078b505fbc566d3f609ce50fc3 Mon Sep 17 00:00:00 2001 From: scardinius Date: Tue, 27 Feb 2018 10:58:40 +0100 Subject: [PATCH] CRM-21808 Install custom group for Contribution or ContributioRecur subtypes based on XML file --- CRM/Utils/Migrate/Import.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CRM/Utils/Migrate/Import.php b/CRM/Utils/Migrate/Import.php index 8a9cf99e74..6c3db98e16 100644 --- a/CRM/Utils/Migrate/Import.php +++ b/CRM/Utils/Migrate/Import.php @@ -242,6 +242,15 @@ WHERE v.option_group_id = %1 elseif (in_array($customGroup->extends, array('Individual', 'Organization', 'Household'))) { $valueIDs = $optionValues; } + elseif (in_array($customGroup->extends, array('Contribution', 'ContributionRecur'))) { + $sql = "SELECT id + FROM civicrm_financial_type + WHERE name IN ('{$optValues}')"; + $dao = &CRM_Core_DAO::executeQuery($sql); + while ($dao->fetch()) { + $valueIDs[] = $dao->id; + } + } else { $sql = " SELECT v.value -- 2.25.1