Antonio-RiveroMartnez opened a new pull request, #23589:
URL: https://github.com/apache/superset/pull/23589
### SUMMARY
When `GENERIC_CHART_AXES ` FF is on and we overwrite a chart, any filter
coming from the dashboard is not saved (it gets removed since its marked as
`isExtra`). However, removing such filter doesn't have to mean we delete the
original temporal filter if any, otherwise the dashboard wont be able to filter
the chart again.
This PR keeps the original `adhoc_filters` from the slice so when calling
the PUT API it doesn't get removed. So any call to
`api/v1/dashboard/{db_id}/charts` is consistent even after you overwrite the
chart.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
### TESTING INSTRUCTIONS
1. Make sure `GENERIC_CHART_AXES` FF is ON
2. Create a chart and add it to a dashboard.
3. Add a time range filter to the dashboard and apply any value.
4. Click on the chart title to access it in the Chart Builder menu.
5. Overwrite the chart (no changes are needed).
6. Go back to the dashboard, and apply any time range filter.
7. The filter must keep working after overwriting the chart
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [X] Required feature flags: `GENERIC_CHART_AXES`
- [ ] 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]