Skip to content

Edit Dataset Metadata: Dataset metadata fields couldn't set to empty result#631

Merged
ofahimIQSS merged 13 commits intodevelopfrom
fix/598-send-empty-values-also
Apr 1, 2025
Merged

Edit Dataset Metadata: Dataset metadata fields couldn't set to empty result#631
ofahimIQSS merged 13 commits intodevelopfrom
fix/598-send-empty-values-also

Conversation

@g-saracca
Copy link
Contributor

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

What this PR does / why we need it:

Fix an issue were empty values were ignored.
Now that related API work was done, we can send empty values while updating a dataset.
This PR does that, so you can send an empty value of a not required field which previously had value.

Important: we also introduce sending the dataset internal version number while updating a dataset, to avoid unwanted changes if updating and outdated dataset, I will add test cases for that.

Which issue(s) this PR closes:

Suggestions on how to test this:

Step 1: Run the Development Environment

  1. Execute npm i.
  2. Navigate with cd packages/design-system && npm i && npm run build.
  3. Return with cd ../../.
  4. Ensure you have a .env file similar to .env.example, with the variable VITE_DATAVERSE_BACKEND_URL=http://localhost:8000.
  5. Navigate with cd dev-env.
  6. Start the environment using ./run-env.sh unstable.
  7. To verify the environment, visit http://localhost:8000 and check your local Dataverse installation.

Step 2: Test the feature

  1. Create a dataset filling required and some non required fields.
  2. Edit that dataset leaving empty non-required fields that had a value entered.

**Step 3: Test the new internal sourcer number validation.

  1. Create a dataset.
  2. Open the edit dataset page in two tabs.
  3. In one update the dataset and save changes.
  4. Then in the other one update the dataset again and save changes, a 400 error should be shown in an alert above the form as you are trying to update a dataset with an outdated internal version number.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No

@g-saracca g-saracca moved this to Ready for Review ⏩ in IQSS Dataverse Project Mar 24, 2025
@g-saracca g-saracca added FY25 Sprint 17 FY25 Sprint 17 (2025-02-12 - 2025-02-26) FY25 Sprint 19 FY25 Sprint 19 (2025-03-12 - 2025-03-26) Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 GREI Re-arch GREI re-architecture-related SPA.Q1 Not related to any specific Q1 feature SPA: Dataset page (View) SPA: Edit Dataset Page bug Something isn't working and removed FY25 Sprint 17 FY25 Sprint 17 (2025-02-12 - 2025-02-26) labels Mar 24, 2025
@coveralls
Copy link

coveralls commented Mar 24, 2025

Coverage Status

coverage: 97.592% (-0.05%) from 97.639%
when pulling 8b2d330 on fix/598-send-empty-values-also
into c5b2c32 on develop.

@cmbz cmbz added the FY25 Sprint 20 FY25 Sprint 20 (2025-03-26 - 2025-04-09) label Mar 30, 2025
@g-saracca
Copy link
Contributor Author

@ChengShi-1 , ready for review 👍🏼

@ChengShi-1 ChengShi-1 self-assigned this Mar 31, 2025
@ChengShi-1 ChengShi-1 moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Mar 31, 2025
@ChengShi-1 ChengShi-1 self-requested a review March 31, 2025 18:17
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.

Looks good. tested on my local environment, works well

@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Mar 31, 2025
@ChengShi-1 ChengShi-1 removed their assignment Mar 31, 2025
@ofahimIQSS ofahimIQSS self-assigned this Apr 1, 2025
@ofahimIQSS ofahimIQSS moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Apr 1, 2025
@ofahimIQSS
Copy link
Contributor

looking good, did further testing and didnt come across any issues.
https://github.com/user-attachments/assets/ff795256-c2f0-4c6f-8630-30f0cb6089f4

@ofahimIQSS ofahimIQSS merged commit b9f3906 into develop Apr 1, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Apr 1, 2025
@ofahimIQSS ofahimIQSS deleted the fix/598-send-empty-values-also branch April 1, 2025 15:58
@ofahimIQSS ofahimIQSS removed their assignment Apr 1, 2025
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Apr 2, 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 19 FY25 Sprint 19 (2025-03-12 - 2025-03-26) FY25 Sprint 20 FY25 Sprint 20 (2025-03-26 - 2025-04-09) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA: Dataset page (View) SPA: Edit Dataset Page SPA.Q1 Not related to any specific Q1 feature

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Edit Dataset Metadata: Dataset metadata fields couldn't set to empty result

5 participants