Describe the Bug
On a collection that has both upload and versions.drafts enabled, using the Duplicate action on a document whose _status is published produces a new document that is also published.
Expected: The duplicated document is created with _status: 'draft'.
Link to the code that reproduces this issue
https://github.com/LimChorngUan/payload/blob/upload-version-enabled-bug/test/_community/collections/Media/index.ts#L12-L14
Reproduction Steps
- Enable drafts on media collection:
- Create a new media and upload an image
- Publish it
- Duplicate the media
- Observe the newly created (duplicated) media has _status published instead of draft.
Which area(s) are affected?
area: core
Environment Info
Describe the Bug
On a collection that has both upload and versions.drafts enabled, using the Duplicate action on a document whose
_statusis published produces a new document that is also published.Expected: The duplicated document is created with _status: 'draft'.
Link to the code that reproduces this issue
https://github.com/LimChorngUan/payload/blob/upload-version-enabled-bug/test/_community/collections/Media/index.ts#L12-L14
Reproduction Steps
Which area(s) are affected?
area: core
Environment Info