-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Discover] Fix csv report for filtered discover result on dashboard #119583
[Discover] Fix csv report for filtered discover result on dashboard #119583
Conversation
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, will test it later on. Could you add a test for it? A functional for this one would be 🍰
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, tested a-la-carte
using Chrome, created a saved search with filter, added to a dashboard, exported CSV. Result was as expected, filter added to saved search was considered in the CSV. Nice work! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, did not test locally
? data.query.timefilter.timefilter.createFilter(index) | ||
: data.query.timefilter.timefilter.createRelativeFilter(index); | ||
|
||
searchSource.setField('filter', filter); | ||
if (existingFilter && timeFilter) { | ||
searchSource.setField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder how common this append to filter approach is. Perhaps it should be part of search source @elastic/kibana-app-services ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @ppisljar
…ilters were applied for non time based data views
@elasticmachine merge upstream |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @dmitriynj |
💔 Backport failed
To backport manually run: |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…lastic#119583) * [Discover] fix csv report for filtered discover result on dashboard * [Discover] fix tests * [Discover] add functional test * [Discover] fix the case when timeFilter was not applied, but others filters were applied for non time based data views Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # src/plugins/discover/public/application/apps/main/utils/get_sharing_data.ts
…lastic#119583) * [Discover] fix csv report for filtered discover result on dashboard * [Discover] fix tests * [Discover] add functional test * [Discover] fix the case when timeFilter was not applied, but others filters were applied for non time based data views Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # src/plugins/discover/public/utils/get_sharing_data.ts
…119583) (#120418) * [Discover] fix csv report for filtered discover result on dashboard * [Discover] fix tests * [Discover] add functional test * [Discover] fix the case when timeFilter was not applied, but others filters were applied for non time based data views Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # src/plugins/discover/public/application/apps/main/utils/get_sharing_data.ts Co-authored-by: Dmitry Tomashevich <39378793+Dmitriynj@users.noreply.github.com>
…119583) (#120419) * [Discover] fix csv report for filtered discover result on dashboard * [Discover] fix tests * [Discover] add functional test * [Discover] fix the case when timeFilter was not applied, but others filters were applied for non time based data views Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # src/plugins/discover/public/utils/get_sharing_data.ts Co-authored-by: Dmitry Tomashevich <39378793+Dmitriynj@users.noreply.github.com>
…lastic#119583) * [Discover] fix csv report for filtered discover result on dashboard * [Discover] fix tests * [Discover] add functional test * [Discover] fix the case when timeFilter was not applied, but others filters were applied for non time based data views Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Fixes #119452
This PR takes into consideration discover filters when generating csv report.
Test notes