'where' => 'civicrm_value_custom_group_' . $customGroupID . '.' . $this->getCustomFieldColumnName('country'),
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
+ 'serialize' => NULL,
'pseudoconstant' => [
'table' => 'civicrm_country',
'keyColumn' => 'id',
'options_per_line' => NULL,
'text_length' => NULL,
'data_type' => 'Country',
- 'html_type' => 'Multi-Select Country',
+ 'html_type' => 'Select Country',
'is_search_range' => '0',
'id' => $this->getCustomFieldID('multi_country'),
'label' => 'Country-multi',
'where' => 'civicrm_value_custom_group_' . $customGroupID . '.' . $this->getCustomFieldColumnName('multi_country'),
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
+ 'serialize' => 1,
'pseudoconstant' => [
'table' => 'civicrm_country',
'keyColumn' => 'id',
'where' => 'civicrm_value_custom_group_' . $customGroupID . '.my_file_' . $this->getCustomFieldID('file'),
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
+ 'serialize' => NULL,
],
$this->getCustomFieldName('text') => [
'name' => $this->getCustomFieldName('text'),
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
'maxlength' => 300,
+ 'serialize' => NULL,
],
$this->getCustomFieldName('select_string') => [
'name' => $this->getCustomFieldName('select_string'),
'where' => 'civicrm_value_custom_group_' . $customGroupID . '.pick_color_' . $this->getCustomFieldID('select_string'),
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
+ 'serialize' => NULL,
'pseudoconstant' => [
'optionGroupName' => $this->callAPISuccessGetValue('CustomField', ['id' => $this->getCustomFieldID('select_string'), 'return' => 'option_group_id.name']),
'optionEditPath' => 'civicrm/admin/options/' . $this->callAPISuccessGetValue('CustomField', ['id' => $this->getCustomFieldID('select_string'), 'return' => 'option_group_id.name']),
'where' => 'civicrm_value_custom_group_' . $customGroupID . '.test_date_' . $this->getCustomFieldID('select_date'),
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
+ 'serialize' => NULL,
],
$this->getCustomFieldName('link') => [
'name' => $this->getCustomFieldName('link'),
'where' => 'civicrm_value_custom_group_' . $customGroupID . '.test_link_' . $this->getCustomFieldID('link'),
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
+ 'serialize' => NULL,
],
$this->getCustomFieldName('int') => [
'name' => $this->getCustomFieldName('int'),
'where' => 'civicrm_value_custom_group_' . $customGroupID . '.' . $this->getCustomFieldColumnName('int'),
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
+ 'serialize' => NULL,
],
$this->getCustomFieldName('contact_reference') => [
'name' => $this->getCustomFieldName('contact_reference'),
'where' => 'civicrm_value_custom_group_' . $customGroupID . '.' . $this->getCustomFieldColumnName('contact_reference'),
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
+ 'serialize' => NULL,
],
$this->getCustomFieldName('state') => [
'name' => $this->getCustomFieldName('state'),
'where' => 'civicrm_value_custom_group_' . $customGroupID . '.' . $this->getCustomFieldColumnName('state'),
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
+ 'serialize' => NULL,
'pseudoconstant' => [
'table' => 'civicrm_state_province',
'keyColumn' => 'id',
'where' => 'civicrm_value_custom_group_' . $customGroupID . '.' . $this->getCustomFieldColumnName('multi_state'),
'extends_table' => 'civicrm_contact',
'search_table' => 'contact_a',
+ 'serialize' => 1,
'pseudoconstant' => [
'table' => 'civicrm_state_province',
'keyColumn' => 'id',
'data_type' => 'StateProvince',
'name' => $this->getCustomFieldName('multi_state'),
'type' => 1,
- 'html_type' => 'Multi-Select State/Province',
+ 'html_type' => 'Select State/Province',
'text_length' => NULL,
'options_per_line' => NULL,
'is_search_range' => '0',
'text_length' => NULL,
'options_per_line' => NULL,
'is_search_range' => '0',
+ 'serialize' => NULL,
'pseudoconstant' => [
'callback' => 'CRM_Core_SelectValues::boolean',
],
'type' => 4,
'where' => 'civicrm_value_testsearchcus_' . $ids['custom_group_id'] . '.date_field_' . $dateCustomField['id'],
'import' => 1,
+ 'serialize' => NULL,
], $queryObj->getFieldSpec('custom_' . $dateCustomField['id']));
}
trim($queryObject->_where[0][0])
);
$this->assertEquals(
- 'FROM civicrm_contact contact_a LEFT JOIN civicrm_address ON ( contact_a.id = civicrm_address.contact_id AND civicrm_address.is_primary = 1 ) LEFT JOIN civicrm_country ON ( civicrm_address.country_id = civicrm_country.id ) LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1) LEFT JOIN civicrm_phone ON (contact_a.id = civicrm_phone.contact_id AND civicrm_phone.is_primary = 1) LEFT JOIN civicrm_im ON (contact_a.id = civicrm_im.contact_id AND civicrm_im.is_primary = 1) LEFT JOIN civicrm_worldregion ON civicrm_country.region_id = civicrm_worldregion.id
-LEFT JOIN ' . $this->getCustomGroupTable() . ' ON ' . $this->getCustomGroupTable() . '.entity_id = `contact_a`.id',
- trim($queryObject->_fromClause)
+ 'FROM civicrm_contact contact_a LEFT JOIN civicrm_address ON ( contact_a.id = civicrm_address.contact_id AND civicrm_address.is_primary = 1 ) LEFT JOIN civicrm_country ON ( civicrm_address.country_id = civicrm_country.id ) LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1) LEFT JOIN civicrm_phone ON (contact_a.id = civicrm_phone.contact_id AND civicrm_phone.is_primary = 1) LEFT JOIN civicrm_im ON (contact_a.id = civicrm_im.contact_id AND civicrm_im.is_primary = 1) LEFT JOIN civicrm_worldregion ON civicrm_country.region_id = civicrm_worldregion.id' .
+ ' LEFT JOIN ' . $this->getCustomGroupTable() . ' ON ' . $this->getCustomGroupTable() . '.entity_id = `contact_a`.id',
+ preg_replace('/\s+/', ' ', trim($queryObject->_fromClause))
);
$this->assertEquals('Test Date - greater than or equal to "June 6th, 2014 12:00 AM"', $queryObject->_qill[0][0]);
$this->assertEquals(1, $queryObject->_whereTables['civicrm_contact']);