kgabryje opened a new pull request #12619:
URL: https://github.com/apache/superset/pull/12619


   ### SUMMARY
   Saved metrics added to controls did not have a unique id - we distinguished 
them only by their names. If we added the same saved metric twice and then 
tried to edit 1, both items were being edited, because their names were equal.
   This PR introduces a `savedMetricId`, which is added to a metric when it's 
added to controls via the metrics popover.
   The saved metrics that had been added before this PR will not have this 
param until they are removed and added again, however everything should still 
work as expected.
   The only case when the bug will still happen is if 2 or more exactly the 
same saved metrics are already in controls panel before this change is 
introduced. In such case, removing the metric and adding it again in control 
panel will fix the issue.
   Fixes https://github.com/apache/superset/issues/12611
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
https://user-images.githubusercontent.com/15073128/105178344-2c995d80-5b28-11eb-88e3-2e55f0f4a63a.mov
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: Fixes 
https://github.com/apache/superset/issues/12611
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   CC: @junlincc @rusackas  @john-bodley @adam-stasiak


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

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