diff --git a/CRM/Contact/BAO/SavedSearch.php b/CRM/Contact/BAO/SavedSearch.php index 19942540c583..4037b828565e 100644 --- a/CRM/Contact/BAO/SavedSearch.php +++ b/CRM/Contact/BAO/SavedSearch.php @@ -437,9 +437,29 @@ public static function saveRelativeDates(&$queryParams, $formValues) { // This is required only until all fields are converted to datepicker fields as the new format is truer to the // form format and simply saves (e.g) custom_3_relative => "this.year" $relativeDates = ['relative_dates' => []]; - $specialDateFields = ['event_relative', 'case_from_relative', 'case_to_relative', 'participant_relative', 'log_date_relative']; + $specialDateFields = [ + 'event_relative', + 'case_from_relative', + 'case_to_relative', + 'participant_relative', + 'log_date_relative', + 'pledge_payment_date_relative', + 'pledge_start_date_relative', + 'pledge_end_date_relative', + 'pledge_create_date_relative', + 'member_join_date_relative', + 'member_start_date_relative', + 'member_end_date_relative', + 'birth_date_relative', + 'deceased_date_relative', + 'mailing_date_relative', + 'relation_date_relative', + 'relation_start_date_relative', + 'relation_end_date_relative', + 'relation_action_date_relative', + ]; foreach ($formValues as $id => $value) { - if ((preg_match('/_date$/', $id) || in_array($id, $specialDateFields)) && !empty($value)) { + if (in_array($id, $specialDateFields) && !empty($value)) { $entityName = strstr($id, '_date', TRUE); if (empty($entityName)) { $entityName = strstr($id, '_relative', TRUE);