Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
This commit is contained in:
parent
a5acdf5371
commit
dad2009acd
|
@ -228,14 +228,13 @@ export const getCombinedFilterQuery = ({
|
|||
to,
|
||||
filters,
|
||||
...combineQueriesParams
|
||||
}: CombineQueries & { from: string; to: string }): string => {
|
||||
return replaceStatusField(
|
||||
}: CombineQueries & { from: string; to: string }): string =>
|
||||
replaceStatusField(
|
||||
combineQueries({
|
||||
...combineQueriesParams,
|
||||
filters: [...filters, buildTimeRangeFilter(from, to)],
|
||||
})!.filterQuery
|
||||
})?.filterQuery
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* This function is a temporary patch to prevent queries using old `signal.status` field.
|
||||
|
@ -243,8 +242,8 @@ export const getCombinedFilterQuery = ({
|
|||
* must be replaced by `ALERT_WORKFLOW_STATUS` field name constant
|
||||
* @deprecated
|
||||
*/
|
||||
const replaceStatusField = (query: string): string =>
|
||||
query.replaceAll('signal.status', ALERT_WORKFLOW_STATUS);
|
||||
const replaceStatusField = (filterQuery?: string): string =>
|
||||
filterQuery?.replaceAll('signal.status', ALERT_WORKFLOW_STATUS) ?? '';
|
||||
|
||||
/**
|
||||
* The CSS class name of a "stateful event", which appears in both
|
||||
|
|
Loading…
Reference in a new issue