Add in setting Data Type when option groups are created from custom fields
authorSeamus Lee <seamuslee001@gmail.com>
Sun, 5 Jun 2016 13:50:24 +0000 (23:50 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Sat, 10 Sep 2016 21:53:23 +0000 (07:53 +1000)
CRM/Core/BAO/CustomField.php

index 2f74319daa58c74178c86154a06fb518d61a5b35..b008b82e27dee8df50108d91372b0e3faf4732df 100644 (file)
@@ -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'])) {