Vitor-Avila opened a new pull request, #41290:
URL: https://github.com/apache/superset/pull/41290
### SUMMARY
The `filters_dashboard_id` URL param for the `/api/v1/chart/<pk>/data` API
was not considering time grain filters applied in the dashboard. This PR fixes
the issue.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
No UI changes.
### TESTING INSTRUCTIONS
Test coverage added. For manual testing:
1. Create a line chart using the `cleaned_sales_data` dataset. Use
`order_date` as the X-Axis with Time Grain set to Day, and any metric.
2. Save this chart to a dashboard.
3. Add a time grain filter to the dashboard, setting its default value to
Year.
4. Hit `GET
/api/v1/chart/{{ChartID}}/data?filters_dahsboard_id={{DashboardID}}` and
confirm the time grain applied is coming from the dashboard (not the chart's
default value).
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]