diff --git a/lhc_web/lib/core/lhchat/searchattr/activestatistic_tab.php b/lhc_web/lib/core/lhchat/searchattr/activestatistic_tab.php index 2d6b5da95f..af3ce27679 100644 --- a/lhc_web/lib/core/lhchat/searchattr/activestatistic_tab.php +++ b/lhc_web/lib/core/lhchat/searchattr/activestatistic_tab.php @@ -15,6 +15,18 @@ ) ); +$fieldsSearch['subject_ids'] = array ( + 'type' => 'text', + 'trans' => 'Bot ID', + 'required' => false, + 'valid_if_filled' => false, + 'filter_type' => 'filterin_elastic', + 'filter_table_field' => 'subject_ids', + 'validation_definition' => new ezcInputFormDefinitionElement( + ezcInputFormDefinitionElement::OPTIONAL, 'int', array( 'min_range' => 1), FILTER_REQUIRE_ARRAY + ) +); + $fieldsSearch['timeto'] = array ( 'type' => 'text', 'trans' => 'Timeto', diff --git a/lhc_web/lib/core/lhchat/searchattr/chatsstatistic_tab.php b/lhc_web/lib/core/lhchat/searchattr/chatsstatistic_tab.php index 6e916c12c0..b2cc83bcaa 100644 --- a/lhc_web/lib/core/lhchat/searchattr/chatsstatistic_tab.php +++ b/lhc_web/lib/core/lhchat/searchattr/chatsstatistic_tab.php @@ -38,6 +38,18 @@ ) ); +$fieldsSearch['subject_ids'] = array ( + 'type' => 'text', + 'trans' => 'Bot ID', + 'required' => false, + 'valid_if_filled' => false, + 'filter_type' => 'filterin_elastic', + 'filter_table_field' => 'subject_ids', + 'validation_definition' => new ezcInputFormDefinitionElement( + ezcInputFormDefinitionElement::OPTIONAL, 'int', array( 'min_range' => 1), FILTER_REQUIRE_ARRAY + ) +); + $fieldsSearch['timefrom'] = array ( 'type' => 'text', 'trans' => 'Timefrom', diff --git a/lhc_web/lib/core/lhcore/lhsearchhandler.php b/lhc_web/lib/core/lhcore/lhsearchhandler.php index 9eb1caa0e8..f5e756497c 100644 --- a/lhc_web/lib/core/lhcore/lhsearchhandler.php +++ b/lhc_web/lib/core/lhcore/lhsearchhandler.php @@ -331,6 +331,10 @@ public static function getParams($params = array()) if (!empty($inputParams->$key)) { $filter['filterin'][$field['filter_table_field']] = $inputParams->$key; } + } elseif ($field['filter_type'] == 'filterin_elastic') { + if (!empty($inputParams->$key)) { + $filter['filterin_elastic'][$field['filter_table_field']] = $inputParams->$key; + } } elseif ($field['filter_type'] == 'manual') { $filter = array_merge_recursive($filter, $field['filter_table_field']); } elseif ($field['filter_type'] == 'filternot') {