I have few collections that have a lot of sub-folders and requesrs. Each of them uses pm.execution.setNextRequest to generate loops if needed based on specific logic.
Each time I copy the collection (or make a fork) then, the old ID remains from the collection I just copied. I have not found a way to automatically replace it with new request id.
Just to provide example:
collection1 has two requests:
- request1 (id “111-111-111”)
-* It has in post-request a code pm.execution.setNextRequest(“222-222-22”); - request2 (id “222-222-2”)
-* It has in post-request a code pm.execution.setNextRequest(“111-111-111”);
when I copy collection1 , it persists the old id, and not the new one:
- request1 (id “333-3333-3333”)
-* It has in post-request a code pm.execution.setNextRequest(“222-222-22”); - request2 (id “4444-4444-444”)
-* It has in post-request a code pm.execution.setNextRequest(“111-111-111”);
The result of the collection copy should be as follows:
- request1 (id “333-3333-3333”)
-* It has in post-request a code pm.execution.setNextRequest(“4444-4444-444”); - request2 (id “4444-4444-444”)
-* It has in post-request a code pm.execution.setNextRequest(“333-3333-3333”);
Is there any settings or a way to make it happen and not manually fix ids in every request after copy?