From 158d5e71860f50afd72e03ec7e2f334673a0e8d3 Mon Sep 17 00:00:00 2001 From: Frank Hassanabad Date: Tue, 4 Aug 2020 06:54:47 -0600 Subject: [PATCH] Fixes one more spot where we forgot to add plumbing for the strict_date_optional_time (#74211) ## Summary Related closed issues: https://github.com/elastic/kibana/issues/58965 https://github.com/elastic/kibana/pull/70713 If you add a custom mapping and go to the hosts details page you will get an error toaster: Screen Shot 2020-08-03 at 7 53 16 PM If running local host you can configure your index patterns to use a custom one I setup with custom date time formats and a single record which can cause this: Screen Shot 2020-08-03 at 7 50 12 PM Then visit this URL and set your date time to go backwards by 1 year ```ts http://localhost:5601/app/security/hosts/app/security/hosts/MacBook-Pro.local/alerts ``` And with the fix you no longer get the error toaster. --- .../security_solution/server/lib/hosts/query.detail_host.dsl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugins/security_solution/server/lib/hosts/query.detail_host.dsl.ts b/x-pack/plugins/security_solution/server/lib/hosts/query.detail_host.dsl.ts index ee0d98c45c4434..10dcb7ee7e7432 100644 --- a/x-pack/plugins/security_solution/server/lib/hosts/query.detail_host.dsl.ts +++ b/x-pack/plugins/security_solution/server/lib/hosts/query.detail_host.dsl.ts @@ -26,6 +26,7 @@ export const buildHostOverviewQuery = ({ { range: { [timestamp]: { + format: 'strict_date_optional_time', gte: from, lte: to, },