Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[URL Drilldown] Range selection over date x-axis timestamp range instead of iso range #90923

Closed
Dosant opened this issue Feb 10, 2021 · 3 comments · Fixed by #91483
Closed

[URL Drilldown] Range selection over date x-axis timestamp range instead of iso range #90923

Dosant opened this issue Feb 10, 2021 · 3 comments · Fixed by #91483
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Drilldowns Embeddable panel Drilldowns

Comments

@Dosant
Copy link
Contributor

Dosant commented Feb 10, 2021

Kibana version: master, 7.x
Describe the bug:

In 7.11 and prior when building a URL drilldown using range selection trigger would provide selection range in ISO format.
In master and 7.x this has changed to timestamps and this is a breaking change.

Steps to reproduce:

  1. Create a dashboard with a vis with date histogram on the x-axis
  2. Create a URL drilldown with Range selection. Use {{event.from}} {{event.to}} from the URL. For example, use to navigate to discover:
{{kibanaUrl}}/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'{{event.from}}',to:'{{event.to}}'))&_a=(columns:!(_source),filters:{{rison context.panel.filters}},index:'{{context.panel.indexPatternId}}',interval:auto,query:(language:{{context.panel.query.language}},query:'{{context.panel.query.query}}'),sort:!())

Save the drilldown

  1. Test the drilldown. See how {{event.from}} {{event.to}} substituted with timestamps instead of ISO strings like in 7.11 and prior. In the example URL case navigation to discover is incorrect because it doesn't support timestamps in time range.

Expected behavior:

{{event.from}} {{event.to}} substituted with ISO strings dates

Any additional context:

We refactored tabify which could have caused this changed.

There is a functional test that should have caught this regression:
https://github.com/elastic/kibana/blob/master/x-pack/test/functional/apps/dashboard/drilldowns/dashboard_to_url_drilldown.ts#L76

But because of not very strict assertion and the fact, the discover just swallowed not supported time range without any error, we missed the regression.

As part of the fix, we should also adjust that functional test.


Please note: if we decide we want/must to with timestamps instead of ISO string, then there is a way to workaround example drilldown. Just using date helper in a template would force an ISO string: {{date event.from}}

@Dosant Dosant added bug Fixes for quality problems that affect the customer experience Team:AppServices Feature:Drilldowns Embeddable panel Drilldowns labels Feb 10, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@Dosant Dosant changed the title [URL Drilldown] Range selection over date x-axis timestamp range instead iso range [URL Drilldown] Range selection over date x-axis timestamp range instead of iso range Feb 10, 2021
@ppisljar
Copy link
Member

checked the tabify and things seem fine there, possible reason would be switching from vislib to xy_chart ?

@stratoula
Copy link
Contributor

After syncing offline, we decided to:

  1. Keep timestamps for URL drilldowns instead of ISO strings.
  2. The only plugin that right now uses ISO strings is the vislib xy axis charts that we will change it to emit timestamps.
  3. As URL drilldowns is in beta and introduced on 7.10 we won't migrate existing URL drilldowns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Drilldowns Embeddable panel Drilldowns
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants