Skip to content
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

Time Range filters from dashboard are not being added to query b for mixed time series #30582

Closed
3 tasks
ObservabilityTeam opened this issue Oct 11, 2024 · 1 comment · Fixed by #30581
Closed
3 tasks
Labels
dashboard:native-filters Related to the native filters of the Dashboard

Comments

@ObservabilityTeam
Copy link
Contributor

Bug description

Hi everyone,

I have found a bug regarding adhoc_filters_b for mixed time series chart. Following are the details. Please let me know if you require more information.

Description:
The bug occurs when you have a mixed time series chart inside a dashboard and the time range filter from the dashboard does not apply to both queries of the mixed time series chart.

Reproduction:

  1. Create a dashboard.
  2. From the dashboard, create a mixed time series chart using the cleaned_sales_data example dataset.
  3. Name the chart what you want.
  4. Add order_date to x axis. Max(sales) for Query A metric and Avg(sales) for Query B metric. Also add a filter for dealsize with all the options to both queries.
  5. Save the chart and go back to the dashboard.
  6. Create a time range filter in the dashboard. I used last 30 years as default value since the data is old.
  7. Go to edit chart from the dashboard.
  8. Change time grain and save the chart.
  9. Go back to the dashboard and view the query on the chart.
  10. The second query will not have the time range filter from the dashboard i.e. no order_date filter in the WHERE clause.

Expected behavior
The time range filter from the dashboard should apply to both queries of the mixed time series chart.

Here is the pull request for the fix.

PR: #30581

Screenshots/recordings

image

Superset version

master / latest-dev

Python version

3.10

Node version

18 or greater

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@dosubot dosubot bot added the dashboard:native-filters Related to the native filters of the Dashboard label Oct 11, 2024
Copy link

dosubot bot commented Oct 11, 2024

Hey @ObservabilityTeam! 👋 I'm here to help you with your bug report. I'm a bot that can assist you in solving bugs, answering questions, and becoming a contributor.

A similar issue was discussed in this closed issue, which was referenced by other related issues like #30235 and #30341. The problem with time range filters not applying to both queries in mixed time series charts is acknowledged, and the suggested solution involves following existing issues for updates and potential workarounds [1].

The pull request #30581 you mentioned is open and aims to fix this issue by ensuring the time range filter is applied to both queries in the mixed time series chart. It includes changes to the saveModalActions.ts file to handle these filters properly.

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard:native-filters Related to the native filters of the Dashboard
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant