Skip to content

Commit

Permalink
Merge pull request #13524 from eileenmcnaughton/search_rc
Browse files Browse the repository at this point in the history
Revert fix causing unreleased regression
  • Loading branch information
seamuslee001 authored Feb 4, 2019
2 parents bb50227 + 8706194 commit aaaf733
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CRM/Contact/BAO/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ public static function createHiddenSmartGroup($params) {
//create/update saved search record.
$savedSearch = new CRM_Contact_BAO_SavedSearch();
$savedSearch->id = $ssId;
$savedSearch->form_values = serialize($params['form_values']);
$savedSearch->form_values = serialize(CRM_Contact_BAO_Query::convertFormValues($params['form_values']));
$savedSearch->mapping_id = $mappingId;
$savedSearch->search_custom_id = CRM_Utils_Array::value('search_custom_id', $params);
$savedSearch->save();
Expand Down
2 changes: 1 addition & 1 deletion CRM/Contact/Form/Search/Advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public function postProcess() {

CRM_Core_BAO_CustomValue::fixCustomFieldValue($this->_formValues);

$this->_formValues = $this->_params = CRM_Contact_BAO_Query::convertFormValues($this->_formValues, 0, FALSE, NULL, $this->entityReferenceFields);
$this->_params = CRM_Contact_BAO_Query::convertFormValues($this->_formValues, 0, FALSE, NULL, $this->entityReferenceFields);
$this->_returnProperties = &$this->returnProperties();
parent::postProcess();
}
Expand Down
4 changes: 1 addition & 3 deletions tests/phpunit/CRM/Contact/BAO/GroupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,9 @@ public function testHiddenSmartGroup() {

$contactID = $this->individualCreate(['custom_' . $customFieldID => 'abc']);

$formValues = ['custom_' . $customFieldID => ['LIKE' => '%a%']];

$hiddenSmartParams = [
'group_type' => ['2' => 1],
'form_values' => CRM_Contact_BAO_Query::convertFormValues($formValues),
'form_values' => ['custom_' . $customFieldID => ['LIKE' => '%a%']],
'saved_search_id' => NULL,
'search_custom_id' => NULL,
'search_context' => 'advanced',
Expand Down

0 comments on commit aaaf733

Please sign in to comment.