dev/core#1974 - ChangeFieldType - "Select (w/serialize)" field should be treated...
authorNoah Miller <nm@lemnisc.us>
Tue, 1 Sep 2020 22:23:25 +0000 (15:23 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 1 Sep 2020 22:23:25 +0000 (15:23 -0700)
CRM/Custom/Form/ChangeFieldType.php

index 24650919ae6cd35ae29fa2268fbb2fd6c16ea1af..8ba794c5cc565655d15c95a405fe76a3371cf375 100644 (file)
@@ -54,6 +54,9 @@ class CRM_Custom_Form_ChangeFieldType extends CRM_Core_Form {
     $params = ['id' => $this->_id];
     CRM_Core_BAO_CustomField::retrieve($params, $this->_values);
 
+    if ($this->_values['html_type'] == 'Select' && $this->_values['serialize']) {
+      $this->_values['html_type'] = 'Multi-Select';
+    }
     $this->_htmlTypeTransitions = self::fieldTypeTransitions(CRM_Utils_Array::value('data_type', $this->_values),
       CRM_Utils_Array::value('html_type', $this->_values)
     );