aminghadersohi commented on PR #44800:
URL: https://github.com/apache/superset/pull/44800#issuecomment-5932212799
On the bito review of 83527e2d:
- **"Chart overrides overwritten" (`dashboard_scope.py` ~596): not
applied.** On a dashboard, the frontend builds chart form data as
`{...chart.form_data, ...extraData}` (`getFormDataWithExtraFilters.ts`). So
when native filters apply, the dashboard's aggregated `extra_form_data`
*replaces* any `extra_form_data` saved on the chart. `_chart_time_column` only
runs when the dashboard applies a time range, so the replacement makes it
resolve the same temporal target the dashboard renders. Merging in the chart's
saved `extra_form_data` would resolve a column the dashboard doesn't use. Saved
chart filters (`adhoc_filters`, `granularity_sqla`, etc.) live in form data,
not `extra_form_data`, so they are still read and still AND with the dashboard
scope.
- Additional suggestions: the 4 test docstring items are style-only and
skipped. Falsy `granularity_sqla`/`time_column`: this matches Superset's own
`bool(form_data.get("granularity_sqla"))` handling, and with no column left the
call is still refused. Empty `dataset_ids`: no caller can pass it (both pass a
non-empty set), and if one did, the call would be refused rather than widened.
No change for any of these.
Separately, f8e1aff7 rewords the scope refusal guidance. Refusals no longer
suggest clearing, changing or working around dashboard filters. They say what
is restricted and that the request must stay within the active dashboard
filters. A unit test checks every refusal message in `dashboard_scope.py` and
`dashboard_scope_sql.py` for clear/remove/disable/bypass wording.
--
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]