[Reporting] CSV Export URL generation adds an absolute time range filter #122575
Labels
bug
Fixes for quality problems that affect the customer experience
(Deprecated) Feature:Reporting
Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead
Feature:Discover
Discover Application
impact:medium
Addressing this issue will have a medium level of impact on the quality/strength of our product.
loe:small
Small Level of Effort
Team:DataDiscovery
Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Kibana version: 7.16.1
Elasticsearch version: Aligned
Describe the bug:
CSV Export URL contains an unexpected time filter, which is not present at the time of the visualization.
Steps to reproduce:
.monitoring-es*
Last 24h
in the timepicker (note the URL contains only(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-24h%2Fh,to:now))&_a=(columns:!(),filters:!(),index:'10881820-3b02-11eb-a646-7340c405390d',interval:auto,query:(language:kuery,query:''),sort:!(!(timestamp,desc)))
(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-24h%2Fh,to:now))&_a=(columns:!(),filters:!(),grid:(),hideChart:!f,index:'10881820-3b02-11eb-a646-7340c405390d',interval:auto,query:(language:kuery,query:''),sort:!(!(timestamp,desc)))
Share / CSV Export / Copy POST URL
.../api/reporting/generate/csv_searchsource?jobParams=%28browserTimezone%3AEurope%2FDublin%2Ccolumns%3A%21%28%29%2CobjectType%3Asearch%2CsearchSource%3A%28fields%3A%21%28%28field%3A%27%2A%27%2Cinclude_unmapped%3Atrue%29%29%2Cfilter%3A%21%28%28meta%3A%28field%3Atimestamp%2Cindex%3A%2710881820-3b02-11eb-a646-7340c405390d%27%2Cparams%3A%28%29%29%2Cquery%3A%28range%3A%28timestamp%3A%28format%3Astrict_date_optional_time%2Cgte%3Anow-24h%2Fh%2Clte%3Anow%29%29%29%29%2C%28meta%3A%28field%3Atimestamp%2Cindex%3A%2710881820-3b02-11eb-a646-7340c405390d%27%2Cparams%3A%28%29%29%2Cquery%3A%28range%3A%28timestamp%3A%28format%3Astrict_date_optional_time%2Cgte%3A%272022-01-09T18%3A00%3A00.000Z%27%2Clte%3A%272022-01-10T18%3A14%3A50.694Z%27%29%29%29%29%29%2Cindex%3A%2710881820-3b02-11eb-a646-7340c405390d%27%2Cparent%3A%28filter%3A%21%28%29%2Cindex%3A%2710881820-3b02-11eb-a646-7340c405390d%27%2Cquery%3A%28language%3Akuery%2Cquery%3A%27%27%29%29%2Csort%3A%21%28%28timestamp%3Adesc%29%29%2CtrackTotalHits%3A%21t%29%2Ctitle%3Ademo-csv-export%2Cversion%3A%277.16.1%27%29
URL Decoded params:
We can see there's an additional query which passes the "current" time, meaning this URL cannot be used for automated reports except manually trimming away the second
range
query (query:(range:(timestamp:(format:strict_date_optional_time,gte:'2022-01-09T18:00:00.000Z',lte:'2022-01-10T18:14:50.694Z')))
).Note that reloading the saved search, the additional time
range
filter is not present. Only the relative filter is present.Expected behavior:
Generate a CSV Export URL which only includes the relative timepicker.
Workaround:
Manually edit the URL to remove the additional unwanted time filter.
The text was updated successfully, but these errors were encountered: