Skip to content
Snippets Groups Projects
Verified Commit 1b3806bc authored by Damien's avatar Damien
Browse files

FEAT #13271 TIME 1:10 Search on ban custom field

parent 246d9e99
No related branches found
No related tags found
No related merge requests found
...@@ -783,6 +783,18 @@ class SearchController ...@@ -783,6 +783,18 @@ class SearchController
$args['searchWhere'][] = "(custom_fields->>'{$customFieldId}')::timestamp <= ?"; $args['searchWhere'][] = "(custom_fields->>'{$customFieldId}')::timestamp <= ?";
$args['searchData'][] = SearchController::getEndDayDate(['date' => $value['values']['end']]); $args['searchData'][] = SearchController::getEndDayDate(['date' => $value['values']['end']]);
} }
} elseif ($customField['type'] == 'banAutocomplete') {
if (!empty($value) && !empty($value['values']) && is_array($value['values'])) {
$where = '';
foreach ($value['values'] as $item) {
if (!empty($where)) {
$where .= ' OR ';
}
$where .= "custom_fields->'{$customFieldId}'->0->>'id' = ?";
$args['searchData'][] = "{$item['id']}";
}
$args['searchWhere'][] = $where;
}
} elseif ($customField['type'] == 'contact') { } elseif ($customField['type'] == 'contact') {
if (!empty($value['values']) && is_array($value['values'])) { if (!empty($value['values']) && is_array($value['values'])) {
$contactSearchWhere = []; $contactSearchWhere = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment