From d333d953a7ea775382ee922b1add616fe48250fd Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sun, 5 Jun 2016 23:50:24 +1000 Subject: [PATCH] Add in setting Data Type when option groups are created from custom fields --- CRM/Core/BAO/CustomField.php | 1 + 1 file changed, 1 insertion(+) diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index 2f74319daa..b008b82e27 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -211,6 +211,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField { $optionGroup->name = "{$columnName}_" . date('YmdHis'); $optionGroup->title = $params['label']; $optionGroup->is_active = 1; + $optionGroup->data_type = $params['data_type']; $optionGroup->save(); $params['option_group_id'] = $optionGroup->id; if (!empty($params['option_value']) && is_array($params['option_value'])) { -- 2.25.1