Use sourceLastUpdateTime in Update Dataset and File Metadata#842
Merged
ofahimIQSS merged 10 commits intodevelopfrom Oct 8, 2025
Conversation
…Time in file metadata updates
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements optimistic concurrency control for dataset and file metadata editing by replacing internal version numbers with last update timestamps. The changes prevent concurrent editing conflicts by using the sourceLastUpdateTime query parameter to ensure users are editing the most recent version of the metadata.
- Replaces
datasetInternalVersionNumberparameter withdatasetLastUpdateTimeacross all dataset metadata forms - Updates file metadata editing to include
datasetLastUpdateTimefor concurrency control - Adds
lastUpdateTimefield toDatasetVersionmodel for tracking version timestamps
Reviewed Changes
Copilot reviewed 50 out of 52 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/dataset/domain/models/Dataset.ts | Adds lastUpdateTime field to DatasetVersion model |
| src/sections/shared/form/DatasetMetadataForm/index.tsx | Replaces datasetInternalVersionNumber prop with datasetLastUpdateTime |
| src/sections/edit-file-metadata/EditFilesList.tsx | Adds datasetLastUpdateTime prop for file metadata concurrency control |
| src/files/domain/useCases/editFileMetadata.ts | Updates to accept sourceLastUpdateTime parameter |
| tests/component/sections/shared/dataset-metadata-form/DatasetMetadataForm.spec.tsx | Updates test cases to use datasetLastUpdateTime instead of internalVersionNumber |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/sections/collection/featured-items/custom-featured-item-card/CustomFeaturedItemCard.tsx
Show resolved
Hide resolved
packages/design-system/src/lib/components/rich-text-editor/RichTextEditor.tsx
Show resolved
Hide resolved
…eLastUpdateTime-in-update-dataset-metadata
…eLastUpdateTime-in-update-dataset-metadata
Contributor
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:
Adds a mechanism to avoid two users updating same dataset version metadata and also same file metadata version.
Usese sourceLastUpdateTime query param for optimistic concurrency control. Depends on this js-dataverse PR.
Which issue(s) this PR closes:
Suggestions on how to test this:
Step 1: Run the Development Environment
./run-env.sh unstable.Step 2:
Test the concurrency control in edit dataset metadata page.
Test the concurrency control in edit file metadata page.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No.
Is there a release notes or changelog update needed for this change?:
Yes, added.