You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "galwan27 (via GitHub)" <gi...@apache.org> on 2026/10/05 11:05:17 UTC

[I] Native filters break after "Save as" with duplicated charts (chartsInScope not remapped in copy_dashboard) [superset]

galwan27 opened a new issue, #44983:
URL: https://github.com/apache/superset/issues/44983

   ### Bug description
   
   Description: When a dashboard is copied with "Save as" and "Also copy (duplicate) existing charts" is checked, native filters work on the first load but stop working after the new dashboard is reopened.
   
   Steps to reproduce
   
   Open a dashboard with native filters scoped to its charts.
   Use "Save as", check "Also copy (duplicate) existing charts", and save under a new name.
   Filters work on the new dashboard.
   Close and reopen the new dashboard. The filters no longer affect the charts.
   
   Root cause In DashboardDAO.copy_dashboard (superset/daos/dashboard.py), old_to_new_slice_ids is used to update positions[*].meta.chartId, and in set_dash_metadata only for the legacy filter_scopes. native_filter_configuration[*].chartsInScope and scope.excluded are passed through md.update(...) unchanged. The copied dashboard therefore keeps the original dashboard's chart IDs.
   
   The equivalent bug for import was fixed with _remap_chart_ids in superset/commands/dashboard/importers/v1/utils.py (#26338 / #38171). The copy path needs the same remapping.
   
   Expected: chartsInScope and scope.excluded refer to the duplicated chart IDs. Actual: They still refer to the original dashboard's chart IDs.
   
   Suggested fix: In copy_dashboard, after updating the layout chart IDs, remap native_filter_configuration[*].chartsInScope and scope.excluded using old_to_new_slice_ids.
   
   Environment: Reproduced on apache/superset:master (code inspection) and on our deployment 6.1.0.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.11
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Native filters break after "Save as" with duplicated charts (chartsInScope not remapped in copy_dashboard) [superset]

Posted by "schizophrenicmaniac (via GitHub)" <gi...@apache.org>.
schizophrenicmaniac commented on issue #44983:
URL: https://github.com/apache/superset/issues/44983#issuecomment-5993333734

   Hi, I'd like to work on this. In DashboardDAO.copy_dashboard I'd use old_to_new_slice_ids to remap chartsInScope and scope.excluded in native_filter_configuration when duplicate_slices is set, the same way _remap_chart_ids does for imports, and add a unit test for it.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Native filters break after "Save as" with duplicated charts (chartsInScope not remapped in copy_dashboard) [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #44983: Native filters break after "Save as" with duplicated charts (chartsInScope not remapped in copy_dashboard)
URL: https://github.com/apache/superset/issues/44983


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org