aminghadersohi opened a new pull request, #41895: URL: https://github.com/apache/superset/pull/41895
## SUMMARY Big Number charts created via the Superset MCP server did not respond to dashboard time-range filters. `map_big_number_config()` in `superset/mcp_service/chart/chart_utils.py` never added a `TEMPORAL_RANGE` adhoc filter (nor set `granularity_sqla`) for the default `big_number_total` viz_type (Big Number without a trendline), so the dashboard's native Time Range filter had no column to bind to. This mirrors the Explore UI's `BigNumberTotal` control panel, which always exposes an `adhoc_filters` control (defaulted to a `TEMPORAL_RANGE` filter on the dataset's main temporal column) even though there's no dedicated time-column control for the total variant. ## BEFORE Big Number charts (without a trendline) created via the MCP server ignored dashboard-level time-range filters — no adhoc filter existed to bind to. ## AFTER `map_big_number_config()` now binds a `TEMPORAL_RANGE` adhoc filter using an explicit `temporal_column`, or falls back to the dataset's `main_dttm_col` when one isn't specified. This reuses the existing `_ensure_temporal_adhoc_filter` helper already used by `map_xy_config` for the same purpose, so both chart types now follow the same pattern for making dashboard time filters effective. ## TESTING INSTRUCTIONS - Added 4 unit tests to `tests/unit_tests/mcp_service/chart/test_big_number_chart.py` covering: dataset fallback binding, no-op when dataset has no temporal column, explicit `temporal_column` without a trendline, and trendline charts getting both `granularity_sqla` and the adhoc filter. - `pytest tests/unit_tests/mcp_service/chart/test_big_number_chart.py tests/unit_tests/mcp_service/chart/test_chart_utils.py -q` → 204 passed - `pytest tests/unit_tests/mcp_service/ -q` → 2596 passed (no regressions) - `ruff format --check` / `ruff check` clean on all changed files ## ADDITIONAL INFORMATION - [x] Has associated tests -- 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]
