Skip to content

[9.0] [Data View Field] Fix popularity score bugs (#211201)#212617

Merged
kibanamachine merged 1 commit intoelastic:9.0from
kibanamachine:backport/9.0/pr-211201
Feb 27, 2025
Merged

[9.0] [Data View Field] Fix popularity score bugs (#211201)#212617
kibanamachine merged 1 commit intoelastic:9.0from
kibanamachine:backport/9.0/pr-211201

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 9.0:

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:41
@kibanamachine kibanamachine merged commit 875ed70 into elastic:9.0 Feb 27, 2025
12 checks passed
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.

2 participants