[8.11] [RAM][Security Solution] Fix time range filter operator in security alerts (#167605) (#168836)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[RAM][Security Solution] Fix time range filter operator in security
alerts (#167605)](https://github.com/elastic/kibana/pull/167605)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Umberto
Pepato","email":"umbopepato@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-10-13T11:34:15Z","message":"[RAM][Security
Solution] Fix time range filter operator in security alerts
(#167605)\n\nCloses #163540\r\n\r\n## Summary\r\n\r\nThe upper bound
time filtering operator used in security solution's\r\nalert table
didn't include the equality (was `lt`, unlike the lower\r\nbound `gte`).
Due to this, filtering by a single point in time (`from ==\r\nto`)
always yielded empty results.\r\n\r\n---------\r\n\r\nCo-authored-by:
Xavier Mouligneau
<xavier.mouligneau@elastic.co>","sha":"8d4eeb9f6d7b1bce62887c29889ffc8dbadd26b4","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","impact:high","Team:ResponseOps","v8.11.0","v8.12.0","v8.10.4"],"number":167605,"url":"https://github.com/elastic/kibana/pull/167605","mergeCommit":{"message":"[RAM][Security
Solution] Fix time range filter operator in security alerts
(#167605)\n\nCloses #163540\r\n\r\n## Summary\r\n\r\nThe upper bound
time filtering operator used in security solution's\r\nalert table
didn't include the equality (was `lt`, unlike the lower\r\nbound `gte`).
Due to this, filtering by a single point in time (`from ==\r\nto`)
always yielded empty results.\r\n\r\n---------\r\n\r\nCo-authored-by:
Xavier Mouligneau
<xavier.mouligneau@elastic.co>","sha":"8d4eeb9f6d7b1bce62887c29889ffc8dbadd26b4"}},"sourceBranch":"main","suggestedTargetBranches":["8.11","8.10"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/167605","number":167605,"mergeCommit":{"message":"[RAM][Security
Solution] Fix time range filter operator in security alerts
(#167605)\n\nCloses #163540\r\n\r\n## Summary\r\n\r\nThe upper bound
time filtering operator used in security solution's\r\nalert table
didn't include the equality (was `lt`, unlike the lower\r\nbound `gte`).
Due to this, filtering by a single point in time (`from ==\r\nto`)
always yielded empty results.\r\n\r\n---------\r\n\r\nCo-authored-by:
Xavier Mouligneau
<xavier.mouligneau@elastic.co>","sha":"8d4eeb9f6d7b1bce62887c29889ffc8dbadd26b4"}},{"branch":"8.10","label":"v8.10.4","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Umberto Pepato <umbopepato@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2023-10-16 04:40:25 -04:00 committed by GitHub
parent 4f9b52df7d
commit 3084a1b4ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -545,7 +545,7 @@ describe('helpers', () => {
range: {
'@timestamp': {
gte: '2020-10-29T21:06:10.192Z',
lt: '2020-10-29T21:07:38.774Z',
lte: '2020-10-29T21:07:38.774Z',
format: 'strict_date_optional_time',
},
},
@ -557,7 +557,7 @@ describe('helpers', () => {
key: '@timestamp',
params: {
gte: from,
lt: to,
lte: to,
format: 'strict_date_optional_time',
},
},

View file

@ -224,7 +224,7 @@ export const buildTimeRangeFilter = (from: string, to: string): Filter[] => [
range: {
'@timestamp': {
gte: from,
lt: to,
lte: to,
format: 'strict_date_optional_time',
},
},
@ -236,7 +236,7 @@ export const buildTimeRangeFilter = (from: string, to: string): Filter[] => [
key: '@timestamp',
params: {
gte: from,
lt: to,
lte: to,
format: 'strict_date_optional_time',
},
},