Search builder error on contact, group 'equals', and possibly other operators
In 5.0.0 and 5.0.2rc we are observing a bug when Search Builder is set with a line like this:
Contacts Groups = [any group]
The log shows as below. We have seen the same thing with other operators too.
The same error appears to be happening on the Drupal Civi 4.7 demo site.
Thanks
`May 08 18:57:44 [info] $Fatal Error Details = Array ( [callback] => Array ( [0] => CRM_Core_Error [1] => handle )
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.sort_name as `sort_name`,
CONCAT_WS(',',
GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
)
as groups FROM civicrm_contact contact_a LEFT JOIN civicrm_group_contact `civicrm_group_contact-121` ON (contact_a.id = `civicrm_group_contact-121`.contact_id AND `civicrm_group_contact-121`.status IN ('Added')) WHERE ( ( ( ( `civicrm_group_contact-121`.group_id = 121 ) ) ) ) AND (contact_a.is_deleted = 0) GROUP BY contact_a.id ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_group_contact.status' in 'field list']
[type] => DB_Error
[user_info] => SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.sort_name as `sort_name`,
CONCAT_WS(',',
GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
)
as groups FROM civicrm_contact contact_a LEFT JOIN civicrm_group_contact `civicrm_group_contact-121` ON (contact_a.id = `civicrm_group_contact-121`.contact_id AND `civicrm_group_contact-121`.status IN ('Added')) WHERE ( ( ( ( `civicrm_group_contact-121`.group_id = 121 ) ) ) ) AND (contact_a.is_deleted = 0) GROUP BY contact_a.id ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_group_contact.status' in 'field list']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.sort_name as `sort_name`,
CONCAT_WS(',',
GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
)
as groups FROM civicrm_contact contact_a LEFT JOIN civicrm_group_contact `civicrm_group_contact-121` ON (contact_a.id = `civicrm_group_contact-121`.contact_id AND `civicrm_group_contact-121`.status IN ('Added')) WHERE ( ( ( ( `civicrm_group_contact-121`.group_id = 121 ) ) ) ) AND (contact_a.is_deleted = 0) GROUP BY contact_a.id ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_group_contact.status' in 'field list']"]
)
`