From b926c88d38cb45151944c063eb74d7c9fb56b153 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Sat, 24 Oct 2015 18:20:37 +1300 Subject: [PATCH] CRM-17442 fix search builder not yet handling formvalue conversion --- CRM/Contact/Form/Task/SaveSearch.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/Form/Task/SaveSearch.php b/CRM/Contact/Form/Task/SaveSearch.php index 427520412f..d055d2e267 100644 --- a/CRM/Contact/Form/Task/SaveSearch.php +++ b/CRM/Contact/Form/Task/SaveSearch.php @@ -186,7 +186,15 @@ class CRM_Contact_Form_Task_SaveSearch extends CRM_Contact_Form_Task { // an exact match for the form requirements & task the form layer with converting backwards and forwards. // Ideally per CRM-17075 we will use entity reference fields heavily in the form layer & convert to the // sql operator syntax at the query layer. - $savedSearch->form_values = serialize($this->get('queryParams')); + if (!$isSearchBuilder) { + $savedSearch->form_values = serialize($this->get('queryParams')); + } + else { + // We want search builder to be able to convert back & forth at the form layer + // to a standardised style - but it can't yet! + $savedSearch->form_values = serialize($formValues); + } + $savedSearch->mapping_id = $mappingId; $savedSearch->search_custom_id = $this->get('customSearchID'); $savedSearch->save(); -- 2.25.1