Skip to content

fix(plugin-import-export): respect defaultVersionStatus for versioned imports#15639

Closed
nehaaprasad wants to merge 1 commit intopayloadcms:mainfrom
nehaaprasad:fix/plug-imp-def-ver-pub
Closed

fix(plugin-import-export): respect defaultVersionStatus for versioned imports#15639
nehaaprasad wants to merge 1 commit intopayloadcms:mainfrom
nehaaprasad:fix/plug-imp-def-ver-pub

Conversation

@nehaaprasad
Copy link
Copy Markdown
Contributor

@nehaaprasad nehaaprasad commented Feb 16, 2026

What?

  • Imports into versioned collections were always created as drafts even when defaultVersionStatus: 'published' was set.

Why?

  • We removed _status from the payload, so Payload’s default 'draft' was applied.

How?

  • We set and pass createData._status from the row or defaultVersionStatus instead of deleting it for versioned collections.

Fixes : #15627

@@ -178,6 +178,7 @@ async function processImportBatch({
const statusValue = createData._status || options.defaultVersionStatus
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the change we need here is

Suggested change
const statusValue = createData._status || options.defaultVersionStatus
const statusValue = options.defaultVersionStatus || createData._status

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and remove default value for defaultVersionStatus as published and make it undefined

Copy link
Copy Markdown

@hedaukartik hedaukartik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added my comments

@paulpopus
Copy link
Copy Markdown
Contributor

Closing as this issue was fixed in another way in a previous PR, do open an issue if it persists!

@paulpopus paulpopus closed this Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugin-import-export defaultVersionStatus: 'published' still creates drafts in versioned collections

3 participants