Skip to content

[Data table] Fix Date Histogram error when index does not have a time field - #69934

Merged
sulemanof merged 3 commits into
elastic:masterfrom
sulemanof:fix/data_table_date_histogram
Jul 2, 2020
Merged

sulemanof merged 3 commits into
elastic:masterfrom
sulemanof:fix/data_table_date_histogram

Conversation

@sulemanof

Copy link
Copy Markdown
Contributor

Summary

Fixes #68977

Creating a data table from an index without a time field with the Date Histogram aggregation causes the app to error out :

make_lable_error

The fix wraps call agg.makeLabel() with try ... catch to filter out such a failure, when a label can't be calculated if a param doesn't have enough data. We had similar case in calculating label for closed accordion state in the default editor: https://github.com/elastic/kibana/blob/master/src/plugins/vis_default_editor/public/components/agg_params_helper.ts#L179

After fix:

make_lable_fix

Also added a unit test case with the date histogram agg without field

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@sulemanof
sulemanof requested a review from stratoula June 25, 2020 15:27
@sulemanof sulemanof added bug Fixes for quality problems that affect the customer experience Feature:Data Table Data table visualization feature release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.8.1 v7.9.0 v8.0.0 labels Jun 25, 2020
@sulemanof
sulemanof marked this pull request as ready for review June 25, 2020 15:28
@sulemanof
sulemanof requested a review from a team as a code owner June 25, 2020 15:28
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@sulemanof

Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@stratoula stratoula left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, tested in chrome. Works as expected

@lukeelmers lukeelmers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM! 🚀

@stratoula

Copy link
Copy Markdown
Contributor

@elasticmachine merge upstream

@kibanamachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@sulemanof
sulemanof merged commit dc2737b into elastic:master Jul 2, 2020
@sulemanof
sulemanof deleted the fix/data_table_date_histogram branch July 2, 2020 08:38
sulemanof added a commit to sulemanof/kibana that referenced this pull request Jul 2, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
sulemanof added a commit that referenced this pull request Jul 2, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
sulemanof added a commit that referenced this pull request Jul 2, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 2, 2020
* master: (46 commits)
  [Visualize] Add missing advanced settings and custom label for pipeline aggs (elastic#69688)
  Use dynamic: false for config saved object mappings (elastic#70436)
  [Ingest Pipelines] Error messages (elastic#70167)
  [APM] Show transaction rate per minute on Observability Overview page (elastic#70336)
  Filter out error when calculating a label (elastic#69934)
  [Visualizations] Each visType returns its supported triggers (elastic#70177)
  [Telemetry] Report data shippers (elastic#64935)
  Reduce SavedObjects mappings for Application Usage (elastic#70475)
  [Lens] fix dimension label performance issues (elastic#69978)
  Skip failing endgame tests (elastic#70548)
  [SIEM] Reenabling Cypress tests (elastic#70397)
  [SIEM][Security Solution][Endpoint] Endpoint Artifact Manifest Management + Artifact Download and Distribution (elastic#67707)
  [Security] Adds field mapping support to rule creation (elastic#70288)
  SECURITY-ENDPOINT: add fields for events to metadata document (elastic#70491)
  Fixed assertion in hybrid index pattern test to iterate through indices (elastic#70130)
  [SIEM][Exceptions] - Exception builder component (elastic#67013)
  [Ingest Manager] Rename data sources to package configs (elastic#70259)
  skip suites blocking es snapshot promomotion (elastic#70532)
  [Metrics UI] Fix asynchronicity and error handling in Snapshot API (elastic#70503)
  fix export response (elastic#70473)
  ...
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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:Data Table Data table visualization feature release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.8.1 v7.9.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Data table vis] Choosing the Date Histogram aggregation causes the app to error out if index does not have a time field

5 participants