From: Seamus Lee Date: Sun, 5 Jun 2016 13:50:24 +0000 (+1000) Subject: Add in setting Data Type when option groups are created from custom fields X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d333d953a7ea775382ee922b1add616fe48250fd;p=civicrm-core.git Add in setting Data Type when option groups are created from custom fields --- 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'])) {