insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

fix importing creates duplicate resources

Open huuphat1908 opened this issue 1 year ago • 3 comments

Current logic

  • Always generate new id for resources when importing
  • No check for existing resources

New logic

  • Only generate new id for resources when importing if the resource has no id
  • Add logic to check if resources have already existed

Test data

Test evidence

  • Before: https://drive.google.com/file/d/1lxiVQCxYQvzTlecmDBDAGc7BZdLh_xN_/view?usp=sharing
  • After: https://drive.google.com/file/d/1VkfwnGxU3CgMJwJrwzc2rVsxz2Dj0kRx/view?usp=sharing

Related issue: https://github.com/Kong/insomnia/issues/5946

huuphat1908 avatar Feb 10 '24 06:02 huuphat1908

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Feb 10 '24 06:02 CLAassistant

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Feb 10 '24 06:02 CLAassistant

This fix is highly relevant for us!

TiagoGouvea avatar Jun 28 '24 11:06 TiagoGouvea

Thanks for the PR! Closing as this creates other issues on the UX and will be addressed in a separate PR.

gatzjames avatar Jul 12 '24 11:07 gatzjames