Skip to content

fix(apply): update existing draft on create conflict [COPS-1687]#1359

Open
Marco Link (marcolink) wants to merge 1 commit into
mainfrom
fix/HK-0000-draft-entry-create-fallback
Open

fix(apply): update existing draft on create conflict [COPS-1687]#1359
Marco Link (marcolink) wants to merge 1 commit into
mainfrom
fix/HK-0000-draft-entry-create-fallback

Conversation

@marcolink

@marcolink Marco Link (marcolink) commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

Handle add-item create conflicts caused by draft-only entries already existing in the target environment. When CMA create returns a version mismatch, the apply flow now loads the target entry, verifies it is an unpublished same-content-type entry, updates it with source fields, publishes it, and tracks it as a successful add.

Why

The changeset generator uses CDA, so target entries that were never published are invisible during diffing and get classified as additions. Applying those additions via CMA can then fail because the target draft already exists.

Risk and Rollout

Low risk. Fallback is limited to VersionMismatch create failures and refuses published entries or content type mismatches. Rollback by reverting the commit.

Ticket

@marcolink Marco Link (marcolink) changed the title fix(apply): update existing draft on create conflict [HK-0000] fix(apply): update existing draft on create conflict [] Jun 18, 2026
@marcolink
Marco Link (marcolink) marked this pull request as ready for review June 18, 2026 09:32
@marcolink
Marco Link (marcolink) requested a review from a team as a code owner June 18, 2026 09:32
@marcolink
Marco Link (marcolink) force-pushed the fix/HK-0000-draft-entry-create-fallback branch from 4e40358 to 24659ac Compare June 18, 2026 09:33
@ramsay-shiells Ramsay Shiells (ramsay-shiells) changed the title fix(apply): update existing draft on create conflict [] fix(apply): update existing draft on create conflict [COPS-1687] Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant