rusackas opened a new pull request, #41960:
URL: https://github.com/apache/superset/pull/41960

   ### SUMMARY
   
   Test-only regression coverage for #28562, where **"Drill to Detail by"** 
launched from a chart on a dashboard reportedly ignores the dashboard's applied 
filters — the drill-to-detail samples query returns rows that are not scoped to 
the dashboard's filter selections.
   
   This PR adds a focused unit test against the backend drill-to-detail action, 
`superset.common.query_actions._get_drill_detail`. That function is the 
samples/drill-detail code path: it rewrites the query object's columns, 
metrics, post-processing and orderby before executing the samples query. The 
test asserts that the transformation leaves `QueryObject.filter` (the chart's 
applied filters) untouched, so the filters survive onto the query object that 
is ultimately executed.
   
   No production code is changed. This is a diagnostic/characterization test to 
pin down whether the reported behavior reproduces in the backend filter-merge 
path.
   
   ### How to interpret CI
   
   - **Green** (current result locally): the backend drill-detail path 
*preserves* the applied filters. The reported bug is **not** reproduced in this 
code path, which points the investigation toward the frontend payload assembly 
(`getDrillPayload` / dashboard native-filter propagation into the chart form 
data) rather than the Python samples path.
   - **Red**: the drill-detail transformation drops the applied filters before 
execution — a live backend reproduction of #28562.
   
   Either way the test is a permanent regression guard: it will fail if a 
future change causes the drill-detail action to strip filters.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   pytest 
tests/unit_tests/common/test_query_actions_currency.py::test_get_drill_detail_preserves_applied_filters
 -v
   ```
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue: Closes #28562
   - [x] Required feature flags: n/a
   - [x] Changes UI: no
   - [x] Includes DB Migration: no
   - [x] Introduces new feature or API: no
   - [x] Removes existing feature or API: no
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to