rdubois-kh opened a new issue, #26338:
URL: https://github.com/apache/superset/issues/26338

   When a dashboard is imported using the `ImportDashboardsCommand` (v1), the 
charts id references are replaced from withing the `position_metadata` and 
`json_metadata` with the ids of the newly created charts in the target instance.
   During that process, it looks like some IDs have been missed in the native 
filters configuration. Indeed, the `chartsInScope` references are never 
replaced with the newly created charts ids.
   
   #### How to reproduce the bug
   
   1. Create a dummy dashboard, with a dummy chart
   2. Export the dashboard
   3. Update the ZIP file chart file, by replacing the `uuid` of the chart with 
a new random `uuid`
   4. Update the ZIP file dashboard file, by replacing the `uuid` of the chart 
with a new random `uuid`, and by replacing the `position.CHART.meta.uuid` entry 
with the chart new `uuid` generated in step 3 above
   5. Re-import the dashboard
   6. Look at the newly create dashboard payload. The `json_metadata` native 
filters `chartsInScope` is still made of the former chart ID
   
   ### Expected results
   
   The imported dashboard `json_metadata` payload `chartsInScope` should be 
made of charts ID which compose this dashboard, in order the `filtersInScope` 
and `filtersOutScope` to be accuratelly computed.
   
   ### Actual results
   
   The imported dashboard `json_metadata` payload `chartsInScope` is made of 
old charts ID which don't compose this new dashboard. It results in  the 
`filtersInScope` and `filtersOutScope` to not be correct after import.
   
   #### Screenshots
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: Chrome
   - superset version: 2.0.1 and 3.0.2
   - python version: 3.9
   - node.js version: N/A
   - any feature flags active: N/A
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version 
of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   


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