Repository navigation
Update existing filters when negated via a visualization - #10778
Merged
Merged
Conversation
Contributor
Author
|
Tests passed, upload of artifacts to s3 just failed |
Contributor
Author
|
@epixa should we try to get this into 5.3? It seems like we might have time, and I feel like it's a relatively bad bug for a new feature |
Contributor
|
Works for me |
lukasolson
approved these changes
Mar 22, 2017
lukasolson
left a comment
Contributor
There was a problem hiding this comment.
Works as expected now. LGTM
Contributor
|
jenkins, test this |
elastic-jasper
added a commit
that referenced
this pull request
Mar 22, 2017
Backports PR #10778 **Commit 1:** Handle single filter scenario * Original sha: ccd24cb * Authored by Matthew Bargar <mbargar@gmail.com> on 2017-03-16T21:03:42Z **Commit 2:** Handle the multi filter scenario * Original sha: c90535d * Authored by Matthew Bargar <mbargar@gmail.com> on 2017-03-16T21:26:28Z
elastic-jasper
added a commit
that referenced
this pull request
Mar 22, 2017
Backports PR #10778 **Commit 1:** Handle single filter scenario * Original sha: ccd24cb * Authored by Matthew Bargar <mbargar@gmail.com> on 2017-03-16T21:03:42Z **Commit 2:** Handle the multi filter scenario * Original sha: c90535d * Authored by Matthew Bargar <mbargar@gmail.com> on 2017-03-16T21:26:28Z
This was referenced Mar 22, 2017
Bargs
pushed a commit
that referenced
this pull request
Mar 22, 2017
Backports PR #10778 **Commit 1:** Handle single filter scenario * Original sha: ccd24cb * Authored by Matthew Bargar <mbargar@gmail.com> on 2017-03-16T21:03:42Z **Commit 2:** Handle the multi filter scenario * Original sha: c90535d * Authored by Matthew Bargar <mbargar@gmail.com> on 2017-03-16T21:26:28Z
Bargs
pushed a commit
that referenced
this pull request
Mar 22, 2017
Backports PR #10778 **Commit 1:** Handle single filter scenario * Original sha: ccd24cb * Authored by Matthew Bargar <mbargar@gmail.com> on 2017-03-16T21:03:42Z **Commit 2:** Handle the multi filter scenario * Original sha: c90535d * Authored by Matthew Bargar <mbargar@gmail.com> on 2017-03-16T21:26:28Z
patrykkopycinski
pushed a commit
to patrykkopycinski/kibana
that referenced
this pull request
May 6, 2026
Negating an existing filter via the data table wasn't working. It works in the discover doc table because it uses the filter_manager's add method, which does some of its own existence checks and inverts a filter if it already exists. The filter_bar_click_handler, which handles creation of filters in visualizations, uses the filter_bar module directly. So I added some generic existence checks to the filter_bar itself and added code to invert existing filters if necessary. This should solve the problem for any new visualizations that might create negated filters in the future. Fixes elastic#10769
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.
Fixes #10769
Negating an existing filter via the data table wasn't working. It works in the discover doc table because it uses the
filter_manager'saddmethod, which does some of its own existence checks and inverts a filter if it already exists. Thefilter_bar_click_handler, which handles creation of filters in visualizations, uses thefilter_barmodule directly. So I added some generic existence checks to thefilter_baritself and added code to invert existing filters if necessary.This should solve the problem for any new visualizations that might create negated filters in the future.