[Discover] Fix context view for date_nanos format with custom timestamps#54089
Merged
kertal merged 11 commits intoelastic:masterfrom Jan 14, 2020
Merged
Conversation
1937102 to
fc0f2f2
Compare
…-20-context-custom-timestamp-fix
Member
Author
|
@elasticmachine merge upstream |
Member
Author
|
@elasticmachine merge upstream |
Member
Author
|
@elasticmachine merge upstream |
Bargs
approved these changes
Jan 13, 2020
Contributor
Bargs
left a comment
There was a problem hiding this comment.
Code change looks good to me and I tested the functionality in Chrome. Had one question about the tests that were changed.
…-20-context-custom-timestamp-fix
…ithub.com:kertal/kibana into kertal-pr-2019-12-20-context-custom-timestamp-fix
Contributor
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Contributor
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
kertal
added a commit
to kertal/kibana
that referenced
this pull request
Jan 14, 2020
…mps (elastic#54089) * Switch from _source to fields when fetching anchor records with date_nanos timestamps * Add testdata * Add functional test
jkelastic
pushed a commit
to jkelastic/kibana
that referenced
this pull request
Jan 17, 2020
…mps (elastic#54089) * Switch from _source to fields when fetching anchor records with date_nanos timestamps * Add testdata * Add functional test
This was referenced Feb 19, 2021
flash1293
pushed a commit
to flash1293/kibana
that referenced
this pull request
Feb 19, 2021
…mps (elastic#54089) * Switch from _source to fields when fetching anchor records with date_nanos timestamps * Add testdata * Add functional test
flash1293
added a commit
that referenced
this pull request
Feb 19, 2021
* Discover: Add handling for source column (#91815) * enable by default * [Discover] Fix context view for date_nanos format with custom timestamps (#54089) * Switch from _source to fields when fetching anchor records with date_nanos timestamps * Add testdata * Add functional test * fix search_after Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
This was referenced Feb 22, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Discover's context view currently doesn't work when you're using a custom formatted
date_nanostimestamp like this:{ "type" : "date_nanos", "format" : "yyyy-MM-dd HH:mm:ss.SSSSSS" }.We're currently using the timestamp stored in
_sourceto provide the context functionality withdate_nanostimestamps, which is due to the limited support of BigInt support of Browsers. If the _source value is formatted in a non standard way, the conversion to a Date Object may fail. This fix switches from the value stored in _source to the value provided byfieldsof the search result.This contains a
strict_date_timeformatted string, so there are no more problems with custom timestamp formatsFixes #48064
Testing
You can use the following data to test the fix:
Before the fix:
After the fix:

Checklist
Use
strikethroughsto 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- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
- [ ] This was checked for breaking API changes and was labeled appropriately- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately