Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][Filters] Incorrect result, when calling setFilters() with multiple duplicates between app and global filters #55591

Merged
merged 3 commits into from
Jan 23, 2020

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Jan 22, 2020

Summary

Working on #55158, noticed bugs while calling setFilters()

Calling setFilters() with multiple similar global and app filters doesn't work as it was intended according to code.
The root cause was appFilters.splice(i, 1); which mutated original array, so the loop _.each loop could miss remaining app filters.

I am not sure exactly if this bug in the method is causing any end user bugs in current master, but with #55158 it prevents back button history to work correctly with pinning / unpinning multiple filters

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@Dosant Dosant requested a review from lizozom January 22, 2020 17:58
@Dosant Dosant changed the title [Bug][Filters] Incorrect result, when calling setFilters() with multiple duplicates between app and global filters [Bug][FilterManager] Incorrect result, when calling setFilters() with multiple duplicates between app and global filters Jan 23, 2020
@Dosant Dosant changed the title [Bug][FilterManager] Incorrect result, when calling setFilters() with multiple duplicates between app and global filters [Bug][Filters] Incorrect result, when calling setFilters() with multiple duplicates between app and global filters Jan 23, 2020
@Dosant Dosant added release_note:skip Skip the PR/issue when compiling release notes v8.0.0 v7.7.0 Team:AppArch labels Jan 23, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@Dosant Dosant added the review label Jan 23, 2020
@Dosant Dosant marked this pull request as ready for review January 23, 2020 08:16
@Dosant Dosant requested a review from a team as a code owner January 23, 2020 08:16
@Dosant
Copy link
Contributor Author

Dosant commented Jan 23, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Dosant Dosant merged commit 5daed94 into elastic:master Jan 23, 2020
@Dosant Dosant deleted the dev/fix-bug-with-filters-merge branch January 23, 2020 20:45
Dosant added a commit to Dosant/kibana that referenced this pull request Jan 23, 2020
Dosant added a commit that referenced this pull request Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Filters release_note:skip Skip the PR/issue when compiling release notes review v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants