-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Dashboard Share URL excludes Experimental Filters and Cross Filters values #16580
Comments
Back-end part to fix this: #17536 The front-end part will come next. |
Awesome thanks @michael-s-molina ! So this should fix all the issues related to filter state? What about old saved URLs? eg, our team already is using /r/156 for something. Will loading state from URL be kept long-term, or do you expect these to be deprecated and thus migrated to the new form? I would vote to NOT deprecate, as I also build links in the dashboard, to take you to another tab with filters pre-set. Eg, I have a table with data. One column is a list of names, and they're from a calculated column in the table that I built to generate a link to another dashboard, pre-filling filter values for that name. Sort of like a clunky drill-down. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
@michael-s-molina Do you know what needs to be done for this and if any progress has been made on this? |
@simonvanderveldt I think this was fixed. I'll close the issue but please reopen it if the bug still exists. |
@michael-s-molina I just tried this, and it doesn't seem to work in superset 4.0.1. Specifically, the native filter values are saved, but any selected cross filter values are not saved when creating a permalink for a dashboard. It does look like the cross filter value is being stored in the permalink json in the Would you be able to re-open this issue? |
When you share a dashboard (Copy Dashboard URL, Share dashboard by email, or click the link icon next to a tab, etc), the native filter values and deprecated filter values are exported with the shortened link. However, cross filters and the new experimental embedded filters (eg, Range Filter, Select Filter, etc) are NOT exported.
Expected results
When you share a dashboard's state with someone, you'd expect ALL parts of the state to be shared. This would include every filter's setting
Actual results
The Cross Filter-type filter values are not exported
How to reproduce the bug
Environment
using the Docker version, so all other software is as-is from the Docker configs
"DASHBOARD_NATIVE_FILTERS": True,
"DASHBOARD_CROSS_FILTERS": True,
"DASHBOARD_FILTERS_EXPERIMENTAL": True,
"ENABLE_EXPLORE_DRAG_AND_DROP": False,
"ENABLE_TEMPLATE_PROCESSING": True,
"DYNAMIC_PLUGINS": True,
"DASHBOARD_RBAC": True,
Checklist
Additional context
A little discussion here: https://apache-superset.slack.com/archives/C016B3LG5B4/p1629643453183200
The generated URLs are shortened, but prior to getting shortened, they're basically a bunch of URL parameters. I dug around and found that the Native Filters and old (deprecated) filter boxes are properly exported, but in file src/dashboard/actions/hydrate.js is what loads the preselect_filters and native_filters from the URL parameters. There's a section on setting up cross filters, but not loading any values for them from URL params. It also doesn't do anything for things like Range Filters.
I tried changing line 194, which only looks for "filter_box" elements, to instead include "filter_*" so that it would catch the range filters. It generated this example set of URL parameters:
preselect_filters={"998":{"COLUMN_NAME":"All"},"1104":{"ANOTHER_COLUMN_NAME":{"filters":[{"col":"ANOTHER_COLUMN_NAME","op":">=","val":93.75}]}}}&native_filters=(NATIVE_FILTER-XofC8k3la:(extraFormData:(),filterState:(),id:NATIVE_FILTER-XofC8k3la,ownState:()))
element 998 is an old-school (apparently deprecated) filter, element 1104 is a range filter (cross filter), and I had no value set for my one native filter. This link doesn't actually apply the set values to element 1104.
I might be able to fix this myself, if I get some assistance on where to look. These filters seem to apply similar to cross filters rather than native filters, so I'm guessing I need to look there.
The text was updated successfully, but these errors were encountered: