[9.0] [Discover] Fix formatting and sorting for custom ES|QL vars (#209360)#210519
Merged
kibanamachine merged 1 commit intoelastic:9.0from Feb 11, 2025
Merged
Conversation
…209360) - Closes elastic#208020 ## Summary By default the data view (which is used in ES|QL mode) has only mapped fields as per field caps for the current index pattern. This PR dynamically extends with additional fields based on ES|QL meta information. This change helps to fix the formatting for ES|QL var values and fixes sorting on them. <img width="1673" alt="Screenshot 2025-02-03 at 18 42 14" src="https://github.com/user-attachments/assets/3647a375-f0f5-43e6-815d-d5a4292c637a" /> <img width="643" alt="Screenshot 2025-02-03 at 18 42 50" src="https://github.com/user-attachments/assets/9d84bc23-7665-43c1-8ac2-d67174b68c31" /> ### Checklist - [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: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co> (cherry picked from commit 9635cfa)
1 task
Contributor
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
cc @jughosta |
jughosta
added a commit
that referenced
this pull request
May 5, 2025
…209360) (#220069) # Backport This will backport the following commits from `main` to `8.19`: - [[Discover] Fix formatting and sorting for custom ES|QL vars (#209360)](#209360) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2025-02-11T09:58:51Z","message":"[Discover] Fix formatting and sorting for custom ES|QL vars (#209360)\n\n- Closes https://github.com/elastic/kibana/issues/208020\r\n\r\n## Summary\r\n\r\nBy default the data view (which is used in ES|QL mode) has only mapped\r\nfields as per field caps for the current index pattern. This PR\r\ndynamically extends with additional fields based on ES|QL meta\r\ninformation.\r\n\r\nThis change helps to fix the formatting for ES|QL var values and fixes\r\nsorting on them.\r\n\r\n<img width=\"1673\" alt=\"Screenshot 2025-02-03 at 18 42 14\"\r\nsrc=\"https://github.com/user-attachments/assets/3647a375-f0f5-43e6-815d-d5a4292c637a\"\r\n/>\r\n<img width=\"643\" alt=\"Screenshot 2025-02-03 at 18 42 50\"\r\nsrc=\"https://github.com/user-attachments/assets/9d84bc23-7665-43c1-8ac2-d67174b68c31\"\r\n/>\r\n\r\n\r\n### Checklist\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>","sha":"9635cfa5268c6250111f8eb5edcd693311a47193","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:DataDiscovery","Feature:ES|QL","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Discover] Fix formatting and sorting for custom ES|QL vars","number":209360,"url":"https://github.com/elastic/kibana/pull/209360","mergeCommit":{"message":"[Discover] Fix formatting and sorting for custom ES|QL vars (#209360)\n\n- Closes https://github.com/elastic/kibana/issues/208020\r\n\r\n## Summary\r\n\r\nBy default the data view (which is used in ES|QL mode) has only mapped\r\nfields as per field caps for the current index pattern. This PR\r\ndynamically extends with additional fields based on ES|QL meta\r\ninformation.\r\n\r\nThis change helps to fix the formatting for ES|QL var values and fixes\r\nsorting on them.\r\n\r\n<img width=\"1673\" alt=\"Screenshot 2025-02-03 at 18 42 14\"\r\nsrc=\"https://github.com/user-attachments/assets/3647a375-f0f5-43e6-815d-d5a4292c637a\"\r\n/>\r\n<img width=\"643\" alt=\"Screenshot 2025-02-03 at 18 42 50\"\r\nsrc=\"https://github.com/user-attachments/assets/9d84bc23-7665-43c1-8ac2-d67174b68c31\"\r\n/>\r\n\r\n\r\n### Checklist\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>","sha":"9635cfa5268c6250111f8eb5edcd693311a47193"}},"sourceBranch":"main","suggestedTargetBranches":["8.18","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/210519","number":210519,"state":"MERGED","mergeCommit":{"sha":"3f49fd963f5d9386dcf47381d053d0e00cc8c37e","message":"[9.0] [Discover] Fix formatting and sorting for custom ES|QL vars (#209360) (#210519)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.0`:\n- [[Discover] Fix formatting and sorting for custom ES|QL vars\n(#209360)](https://github.com/elastic/kibana/pull/209360)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>"}},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209360","number":209360,"mergeCommit":{"message":"[Discover] Fix formatting and sorting for custom ES|QL vars (#209360)\n\n- Closes https://github.com/elastic/kibana/issues/208020\r\n\r\n## Summary\r\n\r\nBy default the data view (which is used in ES|QL mode) has only mapped\r\nfields as per field caps for the current index pattern. This PR\r\ndynamically extends with additional fields based on ES|QL meta\r\ninformation.\r\n\r\nThis change helps to fix the formatting for ES|QL var values and fixes\r\nsorting on them.\r\n\r\n<img width=\"1673\" alt=\"Screenshot 2025-02-03 at 18 42 14\"\r\nsrc=\"https://github.com/user-attachments/assets/3647a375-f0f5-43e6-815d-d5a4292c637a\"\r\n/>\r\n<img width=\"643\" alt=\"Screenshot 2025-02-03 at 18 42 50\"\r\nsrc=\"https://github.com/user-attachments/assets/9d84bc23-7665-43c1-8ac2-d67174b68c31\"\r\n/>\r\n\r\n\r\n### Checklist\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>","sha":"9635cfa5268c6250111f8eb5edcd693311a47193"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
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.
Backport
This will backport the following commits from
mainto9.0:Questions ?
Please refer to the Backport tool documentation