Repository navigation
Fix: restore publicationDate in dataset version api - #12957
Draft
ChengShi-1 wants to merge 1 commit into
Draft
ChengShi-1 wants to merge 1 commit into
ChengShi-1 wants to merge 1 commit into
Conversation
#12846 made publicationDate return the citation year, which is set even for never-published drafts. Clients treated that as a published version and requested :latest-published, getting a 404. Exports already override publicationDate in jsonAsDatasetDto, so the citation year moves to a separate citationYear field.
|
📦 Pushed preview images as 🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
JSF Test Results54 files +4 54 suites +4 48m 30s ⏱️ +22s For more details on these failures, see this check. Results for commit 686bb47. ± Comparison against base commit 22947e4. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
While checking some frontend E2E test failures, I traced to PR #12846 . The dataset-version API previously returned the full publication date in
publicationDateand omitted the field for datasets that had never been published. After #12846, it can return a citation year even for a draft.The frontend uses the presence of
publicationDateto decide whether to fetch:latest-published. For draft-only datasets, that request returns 404.I am not sure if this API behavior change was intentional, but after reading the issue description, I think it is more likely a side effact, and changing this in backend is easier. Let me know if you'd prefer I change the behavior in frontend