mikebridge opened a new pull request, #45530: URL: https://github.com/apache/superset/pull/45530
### SUMMARY **What users saw.** Opening an older dashboard version as a new dashboard could bring along newer settings that were absent from that version. Settings could also still refer to charts omitted from the copied layout. **Why, in plain terms.** The copy started with the live dashboard's settings and overlaid the selected version's values. Missing values therefore came from the live dashboard, and several chart-specific settings were never trimmed to the copied layout. **What this changes.** Copies use the supplied version's metadata as their complete settings. Expanded charts, refresh exemptions, chart configuration and filter-scope chart references retain only charts in the copy; when charts are duplicated, those references use the new chart IDs. The source dashboard and ordinary dashboard-save behavior are unchanged. The copy API already requires `json_metadata`; clients sending partial metadata must send the full settings they want copied. Omitted settings use defaults. `UPDATING.md` documents this compatibility change. The shared metadata-save method and existing legacy filter pruning remain unchanged. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Not applicable: backend copy correction without a UI change. ### TESTING INSTRUCTIONS 1. Save a dashboard version with chart A, then add chart B and change dashboard settings. 2. Open the older version as a new dashboard. 3. Confirm its settings come from the selected version and contain no chart-specific entries for B. 4. When duplicating charts, verify retained chart settings reference the new chart IDs. Local validation: - The new snapshot-copy API regression fails on master and passes with this fix. - 311 DAO/dashboard unit tests pass, including empty/subset layouts and clone-ID remapping. - Changed-file pre-commit checks pass, including MyPy. - Standalone copy API run: 10 passed, two existing duplicate-copy failures tracked by #45528. With that separate fix applied, all 12 copy API tests pass on isolated SQLite. This branch remains independently based on master. ### ADDITIONAL INFORMATION - [ ] 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]
