Skip to content

Conversation

@g-saracca
Copy link
Contributor

@g-saracca g-saracca commented Mar 4, 2025

What this PR does / why we need it:

Modifies the Create/Update Dataset Validator to allow empty values in child fields that are required but their parent fields (compound fields) are not.
These child fields should only be truly required when one of their siblings fields has a value; otherwise, they can be left empty.

I have also added a new parameter to the UpdateDataset use case which is the internalVersionNumber of the dataset, and also now in the GetDataset use case we are returning that property to be used later.
Integration tests were added 👍🏼 .

  • @param {number} [internalVersionNumber] - The internal version number of the dataset. If another user updates the dataset version metadata before you send the update request, data inconsistencies may occur. To prevent this, you can use the optional internalVersionNumber parameter. This parameter must include the internal version number corresponding to the dataset version being updated. Note that internal version numbers increase sequentially with each version update.

Which issue(s) this PR closes:

Related Dataverse PRs:

Suggestions on how to test this:

review code and unit tests

@github-actions github-actions bot added bug Something isn't working FY25 Sprint 18 FY25 Sprint 18 (2025-02-26 - 2025-03-12) GREI Re-arch GREI re-architecture-related SPA.Q1 Not related to any specific Q1 feature SPA.Q1.6 Files Page: Files Edit Options labels Mar 4, 2025
@g-saracca g-saracca marked this pull request as ready for review March 21, 2025 12:49
@g-saracca g-saracca moved this to Ready for Review ⏩ in IQSS Dataverse Project Mar 21, 2025
@g-saracca g-saracca removed the Waiting label Mar 21, 2025
@g-saracca g-saracca moved this to Ready for Review ⏩ in IQSS Dataverse Project Mar 21, 2025
@g-saracca g-saracca added Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 labels Mar 21, 2025
@g-saracca g-saracca moved this from Ready for Review ⏩ to In Progress 💻 in IQSS Dataverse Project Mar 21, 2025
@g-saracca g-saracca self-assigned this Mar 21, 2025
@g-saracca g-saracca moved this from In Progress 💻 to Ready for Review ⏩ in IQSS Dataverse Project Mar 24, 2025
@g-saracca g-saracca removed their assignment Mar 24, 2025
@ChengShi-1 ChengShi-1 self-assigned this Mar 24, 2025
@ChengShi-1 ChengShi-1 moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Mar 24, 2025
Copy link
Contributor

@ChengShi-1 ChengShi-1 left a comment

Choose a reason for hiding this comment

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

Good job! Just 2 small things.

  1. I notice the internalVersion is an optional parameter from api, but it is set to be required in modal dataset.ts and datasetPayload.
  2. Some comments left here, not sure if you want them to be a guidance, or you want to remove them. If it is meant to be there, just ignore my comments there.

Copy link
Contributor

@ChengShi-1 ChengShi-1 left a comment

Choose a reason for hiding this comment

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

Great

@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Mar 26, 2025
@ofahimIQSS ofahimIQSS moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Mar 26, 2025
@ofahimIQSS
Copy link
Contributor

Tests are passing, merging

@ofahimIQSS ofahimIQSS merged commit 2642f92 into develop Mar 26, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Mar 26, 2025
@ofahimIQSS ofahimIQSS deleted the edit-metadata-allow-empty-values branch March 26, 2025 16:37
@ofahimIQSS ofahimIQSS moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working FY25 Sprint 18 FY25 Sprint 18 (2025-02-26 - 2025-03-12) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q1 Not related to any specific Q1 feature SPA.Q1.6 Files Page: Files Edit Options

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

DatasetValidator allow empty fields for conditionally required fields.

3 participants