apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
61.85k stars 13.55k forks source link

Native Date Range Filter Not Applying to Subsequent Dashboard #30341

Open FaidJalal19 opened 8 hours ago

FaidJalal19 commented 8 hours ago

Bug description

  1. I apply several filters in my main dashboard.
  2. These filters, along with the Date Range filter, are passed to the next dashboard.
  3. All filters are automatically applied except the Date Range filter.
  4. For the Date Range filter, I need to manually click "Apply Filter" for it to take effect.
  5. Otherwise, the dashboard displays all data without filtering by date.

How to reproduce the bug

  1. Goto superset, apply some filters.
  2. Using native_filters parameter, pass these filters to subsequent dashboard.

Screenshots/recordings

No response

Superset version

4.0.2

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

dosubot[bot] commented 8 hours ago

I found some similar issues that might be relevant to your problem:

  1. BarChart (Legacy) doesn't take the timerange filter on dashboard - This issue was resolved by updating Superset to version 2.1.1 [1].
  2. Multiple issues with time range dashboard native filters - This issue was closed, and it was suggested to follow existing issues for related problems [2].
  3. Dashboard native filter time range not applying to some in-scope charts - This issue was resolved in version 2.1.1rc1 [3].

For your specific issue in Superset version 4.0.2, the Date Range filter not automatically applying could be due to the test case for creating a time range filter being marked as skipped, indicating that the functionality might not be fully implemented or tested. Additionally, there is a migration script that updates the json_metadata of dashboards to handle time range filters. Ensuring that this migration has been applied correctly might resolve the issue [4][5][6][7].

You might want to check if the migration script convert_filter_scopes_to_native_filters has been executed correctly and if the __time_range field is set properly in your dashboard's metadata.

To continue talking to Dosu, mention @dosu.