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

   ### SUMMARY
   When setting native or filter box filters in a dashboard and then exploring 
a Mixed Timeseries chart and then saving the chart, the extra filters are only 
removed from the first query. This PR changes the removal logic so that all 
controls that start start with the text `adhoc_filters` are cleaned from extra 
filters before saving. The logic is added both to the deprecated backend logic 
(set for removal in 3.0) and the new frontend logic which cleans the extra 
adhoc filters before POSTing to the v1 chart API.
   
   ### AFTER
   With this fix the extra filters are removed from the second query of the 
mixed chart (notice there are no extra filters in the adhoc filter control):
   <img width="934" alt="image" 
src="https://user-images.githubusercontent.com/33317356/189840746-da6f01da-ecc0-447c-8fe9-75b52bd899cc.png";>
   
   ### BEFORE
   Previously saving the mixed chart with an extra filter would persist the 
extra filters in the chart metadata:
   <img width="944" alt="image" 
src="https://user-images.githubusercontent.com/33317356/189840416-eb1edb37-77b1-480a-ae51-4051a7deed29.png";>
   
   
   ### TESTING INSTRUCTIONS
   1. Create a Mixed chart
   2. Add it to a dashboard and create a native filter
   3. Apply the native filter to the chart and edit the chart
   4. Save the chart and notice that the extra filter is removed from Query A 
but is still present in Query B after saving.
   
   ### 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]

Reply via email to