Ensure filter_manager.add doesn't freak out if there's a custom filter present#8038
Closed
samcday wants to merge 1 commit intoelastic:masterfrom
Closed
Ensure filter_manager.add doesn't freak out if there's a custom filter present#8038samcday wants to merge 1 commit intoelastic:masterfrom
samcday wants to merge 1 commit intoelastic:masterfrom
Conversation
Contributor
|
Can one of the admins verify this patch? |
Author
|
I don't know if Atlassian has signed the CLA. Frankly, for a one-liner fix I'm not sure I can be bothered poking the internal bureaucracy to make that happen. Can a core dev just feel a sudden surge of inspiration to fix this bug independently of this PR? :) |
Bargs
pushed a commit
to Bargs/kibana
that referenced
this pull request
Aug 22, 2016
filterManager.add assumes that if it finds a filter that has a query prop, then it must also have a match clause contained in that query. User created custom filters may use term queries, range queries and the like. Once you've added any filters without a match clause like that, you can no longer add new filters by clicking the "add filter" icon next to a field in the results. Instead you'll get an error that says "Cannot read property '<your-prop>' of undefined" when filterManager.add iterates over your custom filter with no match key. Fixes: elastic#7246 Related: elastic#8038
Bargs
added a commit
to Bargs/kibana
that referenced
this pull request
Aug 22, 2016
filterManager.add assumes that if it finds a filter that has a query prop, then it must also have a match clause contained in that query. User created custom filters may use term queries, range queries and the like. Once you've added any filters without a match clause like that, you can no longer add new filters by clicking the "add filter" icon next to a field in the results. Instead you'll get an error that says "Cannot read property '<your-prop>' of undefined" when filterManager.add iterates over your custom filter with no match key. Fixes: elastic#7246 Related: elastic#8038
Contributor
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.
filterManager.addassumes that if it finds a filter that has aqueryprop, then it must also have amatchcontained in that query.We have custom filters that are using term queries and range queries and the like. Once you have a saved search with any bespoke filters like that, you can no longer add new filters by clicking the little +🔍 icon next to a field in the results.
This fixes it.