forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Lens] Fix sorting on table when using Last value on date field (elas…
…tic#177288) ## Summary Fixes elastic#175659 The bug was due to the format returned from the `Last value` of a date field, which was the ISO string type, but the sorting criteria was assuming a number format for dates. I've revisited the `kbn-sort-predicates` logic for dates to support now both numeric and ISO string format, with dedicated test suite. <img width="449" alt="Screenshot 2024-02-20 at 13 45 07" src="https://github.com/elastic/kibana/assets/924948/091e2a9d-70d1-44e1-b42b-c396df0fa1ab"> <img width="434" alt="Screenshot 2024-02-20 at 13 45 01" src="https://github.com/elastic/kibana/assets/924948/5d6ac269-96b9-4ea9-80a9-e8db8934e00b"> Also, it was an opportunity to uniform the logic for multi-values comparisons and document it in the package `README`. ### Checklist Delete any items that are not applicable to this PR. - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Stratoula Kalafateli <[email protected]>
- Loading branch information
Showing
3 changed files
with
173 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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