insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Importing a collection now creates duplicate requests

Open rmisiakexscientia opened this issue 1 year ago • 9 comments

Expected Behavior

When a collection is imported into an existing collection, any requests that already exist are updated/not modified, like 2023.1.0

Actual Behavior

Requests are duplicated

Reproduction Steps

  1. Create a new collection
  2. Create a new request
  3. Export the collection to a file
  4. Import the collection from the file into the same collection

You end up with a copy of the requests, previous versions of insomnia merged/updated the request rather than creating a duplicate

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

2023.2.0

What operating system are you using?

macOS

Operating System Version

ventura 13.3.1

Installation method

download from site

Last Known Working Insomnia version

2023.1.0

rmisiakexscientia avatar May 05 '23 08:05 rmisiakexscientia

Same problem here

ByleX1337 avatar May 05 '23 21:05 ByleX1337

Same problem here - verified it working in v2023.1.0 this morning, then updated to v2023.2.0 where it doesn't work.

It seems the underlying import/export was changed around end of March by https://github.com/Kong/insomnia/pull/5869

What operating system are you using? Windows

Operating System Version Windows 10 Enterprise 22H2

SorenA avatar May 08 '23 12:05 SorenA

Same problem here - we experienced the same behavior and noticed that the request ids aren't kept according to the values saved after export. Because we use environment variables with references to specific requests, we lose these references.

Additionally, when importing a collection along with the environment, we notice that the environments aren't imported either.

Both behavior in version 2023.2.0 as you refer, we started to use version 2023.1.0 to not have this behavior.

TelmoRodrigues avatar May 16 '23 14:05 TelmoRodrigues

Same issue here

iiropeltokangas avatar Jun 21 '23 11:06 iiropeltokangas

Same issue

willemdh avatar Dec 13 '23 07:12 willemdh

Same issue

huuphat1908 avatar Jan 08 '24 03:01 huuphat1908

I created a PR to fix this issue https://github.com/Kong/insomnia/pull/7081

huuphat1908 avatar Feb 10 '24 06:02 huuphat1908

@huuphat1908 you need just accept the CLA, so the PR can be merged.

This is critical to work.

TiagoGouvea avatar Jun 28 '24 10:06 TiagoGouvea

@huuphat1908 you need just accept the CLA, so the PR can be merged.

This is critical to work.

Hi, I've signed the CLA since Feb 10

huuphat1908 avatar Jun 28 '24 11:06 huuphat1908