Skip to content

[8.17] [Data View Field] Fix popularity score bugs (#211201)#212614

Merged
kibanamachine merged 3 commits intoelastic:8.17from
kibanamachine:backport/8.17/pr-211201
Feb 27, 2025
Merged

[8.17] [Data View Field] Fix popularity score bugs (#211201)#212614
kibanamachine merged 3 commits intoelastic:8.17from
kibanamachine:backport/8.17/pr-211201

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.17:

Questions ?

Please refer to the Backport tool documentation

- Fixes elastic#211109

## Summary

This PR fixes a number of bugs in fields popularity logic:
- [x] If field popularity was customized via UI form, the value will be
saved now as a number instead of a string
- [x] Same for runtime fields in another part of the code
- [x] Since the data was polluted with string values, this PR makes sure
that the incrementing would still work and the result would be converted
to number.
- [x] If user opened the field flyout, when selected/deselected fields
as columns in the table, then opened the field flyout again, the data
shown as Popularity was outdated. Now it should be fixed.
- [x] Prevents reseting of Popularity scores in other fields.
- [x] Functional tests in
`test/functional/apps/discover/group6/_sidebar.ts` and
`test/functional/apps/management/data_views/_index_pattern_popularity.ts`.

### 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

(cherry picked from commit 9726041)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Feb 27, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) February 27, 2025 10:40
@kibanamachine kibanamachine merged commit 0ec6573 into elastic:8.17 Feb 27, 2025
8 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
data 2594 2596 +2
dataViews 443 447 +4
total +6

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dataViewFieldEditor 158.1KB 158.2KB +133.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dataViewFieldEditor 25.2KB 25.2KB +53.0B
dataViews 61.5KB 61.7KB +177.0B
total +230.0B
Unknown metric groups

API count

id before after diff
data 3209 3213 +4
dataViews 1225 1233 +8
total +12

History

cc @jughosta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants