postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.83k stars 838 forks source link

Performing Duplicate on a request in a collection does not duplicate added headers #8366

Open garywade opened 4 years ago

garywade commented 4 years ago

Describe the bug After I've created a request in a collection that includes values for headers to send, I want to duplicate that request with the same headers and so make changes to a few of those headers in the new request. However, after performing the duplicate operation, the only headers present are the pre-filled ones made by Postman.

To Reproduce Steps to reproduce the behavior:

  1. Create a request in a collection and add some values for some headers
  2. Choose whichever UI affordance you prefer for duplicate with the just-created request and choose Duplicate
  3. Select the newly created request
  4. Open the headers tab for the newly created request and notice the values from the original request are not copied over.

Expected behavior The headers that the user has added should be copied over. If desired to allow the user to not do so, an alternate menu item by way of using the option key might be fine to allow some items to not be copied.

Screenshots

App information (please complete the following information):

Additional context This appears to work if you do it for the 3rd or following request in the container, but not for the first or second one. However, it's not consistent for the 3rd or following; on the sixth item, it duplicated the headers from the 3rd item.

vvs11 commented 4 years ago

@garywade I tried reproducing the issue but couldn't do so. Can you share a recording of your screen where you're facing this issue? It'd be very helpful for us to understand the exact steps to be performed.

garywade commented 4 years ago

Here you go. I verified it still happens with the latest update as referenced in the screen recording. Screen Recording 2020-04-25 at 12.41.05 PM.mov.zip

garywade commented 4 years ago

I've found that this no longer works at all in 7.31.1 (7.31.1). What good is the duplicate command if you have to fill in everything?

garywade commented 4 years ago

Here's a screen recording of it being even worse with the latest update. Screen Recording 2020-08-30 at 6.58.30 PM.zip

garywade commented 4 years ago

I did some more playing around, and once I closed all my tabs, doing a save when asked (I eventually had to do a force-close since some tabs wouldn't close otherwise; some were marked as DELETED), I was then able to do a duplicate on any request and get the actual data duplicated. I guess the UI is not intuitive enough for my needs to see the tabs that were opened, and I had a lot, and the grayed-out Save button, upon looking at the far right may do something, but being a regular Mac user, I expect that if something should be savable, it should live in the File menu with a Command-S. So, just guessing that this state where a duplicate just creates a new request without any data (or only the URL) only happens when there are lots of tabs open, some of which are labeled with DELETE on them.

oliver-90 commented 3 years ago

Thank you, it seemed closing those tabs worked on my side as well.

using MacBook Pro M1 13"inch 8gig ram

danadri commented 3 years ago

Postman Version : v8.0.2 OS : Windows 10 Same issue

dlavor commented 3 years ago

Same here. W10, Postman v8.0.4

carlospauluk commented 3 years ago

Confirm what @garywade said about closing all tabs, but I think that Postman should duplicate even if that tab was not saved yet. Thanks!

itinance commented 3 years ago

Faced the same issue. One has to save the current Request in open Tab with Cmd-S (at least on Apple) and then everything will copied over even headers

dlavor commented 3 years ago

True, then it works as expected.

andersen58 commented 1 year ago

Wouldn't a simple "Unsaved Changes will not be duplicated. Continue?" when you ask Postman to duplicate a request solve this issue? It forces you to remember to save it first. I'm new to Postman and this bit me pretty hard today while testing something that worked on DEV and had recently been moved to Production.

sgandon commented 1 day ago

Even saving the tab does not make duplication work on my mac version. Version 11.17.1 UI Version: 11.17.1-ui-241016-0849 Desktop Platform Version: 11.17.0 (11.17.0)