Skip to content

Pass raw values and format afterwards#48090

Merged
flash1293 merged 5 commits intoelastic:masterfrom
flash1293:flash1293/formatted-date-range-filter
Oct 22, 2019
Merged

Pass raw values and format afterwards#48090
flash1293 merged 5 commits intoelastic:masterfrom
flash1293:flash1293/formatted-date-range-filter

Conversation

@flash1293
Copy link
Contributor

Summary

Fixes #40334 and the same bug for IP ranges.

Date range and Ip range aggregations applied formatters to the value in the data table before passing it to the visualization. Because of this the raw values were not available for filter operations (e.g. when clicking a pie slice). The old solution attempted to parse the values out of the formatted value, but this fails in a couple of situations (e.g. when custom field formatters are applied to the values). This PR puts the raw values into the data table and makes sure the field formatter has all information to apply the correct format when actually showing the value to the user.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

- [ ] This was checked for cross-browser compatibility, including a check against IE11
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
- [ ] Documentation was added for features that require explanation or tutorials

For maintainers

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@flash1293 flash1293 marked this pull request as ready for review October 14, 2019 13:53
@flash1293 flash1293 added the Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// label Oct 14, 2019
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

code LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💔 Build Failed

@flash1293
Copy link
Contributor Author

Jenkins, test this.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@flash1293 flash1293 merged commit afc5761 into elastic:master Oct 22, 2019
@flash1293 flash1293 deleted the flash1293/formatted-date-range-filter branch October 22, 2019 12:58
flash1293 added a commit to flash1293/kibana that referenced this pull request Oct 22, 2019
flash1293 added a commit to flash1293/kibana that referenced this pull request Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:FieldFormatters release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.5.0 v7.6.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Date resolves to infinity in Kibana Visualization when the Date format is changed.

3 participants