postman-app-support
postman-app-support copied to clipboard
Don't copy examples when duplicating collection requests
Is your feature request related to a problem? Please describe. When duplicating a request in a collection, it also replicates all the examples attached to the original request. This just creates the additional work of having to delete the replicate example, because the user is almost certainly going to change the request, making the old example irrelevant.
Describe the solution you'd like Duplicating requests in a collection should only duplicate the request itself, not any examples. A new example can be generated with only 2 clicks, and it'd be relevant to the updated request. Deleting takes 3 clicks, and in any case, it'd be better to make the default (zero-click) behavior fit the use case that's more likely.
Describe alternatives you've considered Could keep deleting replicate examples.
Additional context None
It makes sense to have the ability to delete the examples from the new copy as the copy is made, but make it optional. Alternatively, there could be a "delete all examples" button in the collection that deletes all examples from the requests inside that collection. That way deleting examples is separate from copying the collection and it adds a handy new feature to the UI. The folders could also have a "delete all examples" button too.
It makes sense to have the ability to delete the examples from the new copy as the copy is made, but make it optional.
Thanks for chiming in! IMHO, it'd be fine to create an option to control this, but I still think the default behavior should be to avoid creating replicate examples. I can't think of a best-practice use case that benefits from them, but if you have one, I'm curious to hear it. And to make sure we're on the same page, I'm only talking about duplicating individual requests in a collection, not the whole collection (though I think this also applies there).
For instance, I could imagine a user thinking that replicating examples would be helpful for creating duplicates for the same endpoint in different environments. However, it'd be way better to use the built-in environments feature for this instead of turning the collection into a massive mess of cross-joins between endpoints and different envs/states.
Up. The default behavior should be to duplicate without examples. Consider the following example (which is what I have on my current project): I have multiple requests in API and I want to have those requests in postman collection. I create the first request manually, setting up all headers, auth, etc. then duplicate the request and adjust (ex. change GET to POST). The examples will be duplicated, but it will apply only to original request.
I can't think of situation where I duplicate request, change it and still want to have examples from original, unmodified request.
Upvote for all the mentioned reasons!
We've made it easier to delete examples with multi-select, you can use the Cmd/Ctrl or Shift modifier to select multiple examples and delete them with the delete button. Will keep the ticket open to track this as a feature

@giridharvc7 In what version is this available? Multi-select doesn't seem to work in v10.13.
@giridharvc7 Anyway. Why duplicate X examples that we will have to delete immediately?
1 -> Click dots menu 2 -> Click Duplicate 3 -> Click to expand duplicated request 4 -> Press shift key 5 -> Click first example 6 -> Click last example 7 -> Release shift key 8 -> Press Del 9 -> Click to confirm Delete popup
It's a little easier, but nothing compared to having an option called "Duplicate without examples"
1 -> Click dots menu 2- > Duplicate without examples
That's all.
Another option is to make the duplicate request option have a sub-menu that shows "duplicate with examples" and "duplicate without examples".
Any updates on this issue / feature request? Seems like it would be an easy fix (either adding an option in preferences to not duplicate by default, or adding a 'Duplicate-no examples' in the ellipses dropdown)