Skip to content

fix(load): put CDS DOI only on latest version - #634

Open
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/doi-latest-version-only
Open

TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/doi-latest-version-only

Conversation

@TahaKhan998

Copy link
Copy Markdown
Contributor

closes #628

when a record has a CDS DOI and multiple versions, new_version() clears pids so the DOI was sticking on v1 instead of the latest.
this strips the CDS DOI from the first create when there are multiple versions, puts it back on the latest draft before publish, and skips the post-publish DOI update on versions that dont carry the DOI.

@TahaKhan998
TahaKhan998 force-pushed the fix/doi-latest-version-only branch from a88e955 to 2a7d1da Compare October 12, 2026 13:57
Comment thread tests/cds-rdm/test_transform_versions.py Outdated


def test_create_payload_keeps_cds_doi_for_single_version():
"""Single-version CDS DOI records keep the DOI on create (#628)."""

@sakshamarora1 sakshamarora1 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Can the issue # be removed? I'm not sure we need it

@TahaKhan998
TahaKhan998 force-pushed the fix/doi-latest-version-only branch from 2a7d1da to cf517d3 Compare October 14, 2026 15:31
@TahaKhan998
TahaKhan998 force-pushed the fix/doi-latest-version-only branch from cf517d3 to 6aa3461 Compare October 16, 2026 07:28
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.

CDS DOIs only: set the DOI only on the latest version (instead of the first)

2 participants