insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Preserve request chaining when duplicating or importing workspaces

Open Rcuz8 opened this issue 2 years ago • 13 comments

Expected Behavior

Let's say you have a folder A of chained requests.

/A
  - r1
  - r2 (depends on r1 response)

When you duplicate that folder (creating new folder B), the chained links should update properly:

/A
  - r1
  - r2 (depends on r1 response)
/B
  - r1
  - r2 (depends on B/r1 response)

Actual Behavior

/A
  - r1
  - r2 (depends on r1 response)

When you duplicate that folder (creating new folder B), the chained links don't update properly:

/A
  - r1
  - r2 (depends on r1 response)
/B
  - r1
  - r2 (depends on A/r1 response) <---- should depend on B/r1 response)

Reproduction Steps

Create a folder with 2 requests. The second request should have a variable that depends on the first response body. Duplicate it.

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

2022.7.5

What operating system are you using?

macOS

Operating System Version

12.6

Installation method

Download from Insomnia site

Last Known Working Insomnia version

No response

Rcuz8 avatar Jan 26 '23 17:01 Rcuz8

This problem also affects environmental variables

/A
  - r1
  - r2 (depends on r1 response)
  - env (depends on r2 response id)
/B
  - r1
  - r2 (depends on A/r1 response) <---- should depend on B/r1 response)
  - env (depends on A/r2 response id)

The ids are globally unique, would it be possible to change this for each document?

In document A r1 has the id x

In document B r1 has the id y.

A possible solution would be for the requests and properties of the document to be unique only within it.

With this we can have more than one request with the same ID, but not in the same document

PedroLuisBrilhadori avatar Dec 23 '23 03:12 PedroLuisBrilhadori

Any updates here?

Issue 5942 referenced above is still a pain when needing to share collections (export/import).

rezamanshouri avatar Jan 22 '24 23:01 rezamanshouri

I have the same issue but noticed something strange.

If I export a collection and import it as a new collection on the same Insomnia instance I exported it, the reference IDs are maintained. However when I send the export file to a coworker and they import the collection the reference IDs are reassigned and the tags break.

Stratum-Jeremy avatar Feb 01 '24 21:02 Stratum-Jeremy

@Stratum-Jeremy

When you export a collection that you export yourself, the IDs exist in the local database and therefore work perfectly.

Test:

  1. export collection,
  2. delete old collection,
  3. import. This way the error will occur

PedroLuisBrilhadori avatar Feb 01 '24 21:02 PedroLuisBrilhadori

This bug is blocking to work with team, every member tries to fix same problem sometimes success sometimes failure. We choose to change tool.

efeevren avatar Mar 12 '24 07:03 efeevren

This issue has been reported multiple times and there is a PR for it. Can someone give an update what is required for this to proceed?

bwaidelich avatar Mar 13 '24 16:03 bwaidelich

Yes, this is a big problem for collaborative work. We will change the tool if this is not fixed soon.

Yocker95k avatar Mar 13 '24 22:03 Yocker95k

Started trying to share Collections with team mates today and hit this issue, is there an ETA on resolution? Really kills the usefulness of the app if a junior can't import an API Collection to see how an API works.

UnicodeTreason avatar May 27 '24 03:05 UnicodeTreason

Any chance to have this thing fixed? It's impossible to share collections

tl-luca-mazzanti avatar Jun 14 '24 13:06 tl-luca-mazzanti

Any updates here? It's impossible to share collections

AnnaGolosova avatar Jul 12 '24 10:07 AnnaGolosova

Switching software, this won't work.

BlaineCharter avatar Jul 23 '24 16:07 BlaineCharter