Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/528 Use fields from parent - Create Collection form behavior #540

Merged
merged 5 commits into from
Nov 8, 2024

Conversation

g-saracca
Copy link
Contributor

@g-saracca g-saracca commented Nov 1, 2024

What this PR does / why we need it:

In the Create Collection form, when the user checks the “Use fields from [parent]” checkbox, we are now sending metadata block names and input levels as undefined to the js-dataverse use case.
This was tested also using the GHCR container image generated from IQSS/dataverse#10985 PR and it works great.

This comment from @pdurbin explains what this is fixing very well.

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 fix

  1. Create a collection called "One", but not using fields from Root, select an extra metadata block.
  2. Create another collection called "One child" within the "One" collection, leave the "Use fields from One" checked.
  3. Navigate to create a collection within "One child" and check that in the metadata fields section the default metadata blocks checked are the same from collection "One", its not necessary to create another collection here.
  4. Go to the JSF version and edit the metadata blocks from collection "One" (edit collection is not yet supported in the SPA).
  5. Go to the "One child" collection within the SPA, navigate to create a collection in it and verify now that in the metadata fields section, the default metadata blocks checked are now the same from collection "One", its also not necessary to create another collection here.

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

No

Is there a release notes update needed for this change?:

No

Additional documentation:

No

@g-saracca g-saracca added bug Something isn't working Size: 3 A percentage of a sprint. 2.1 hours. GREI Re-arch GREI re-architecture-related SPA: New Collection Page Original size: 3 FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) labels Nov 1, 2024
@coveralls
Copy link

coveralls commented Nov 1, 2024

Coverage Status

coverage: 97.574% (+0.2%) from 97.388%
when pulling 355afad on fix/528-use-fields-from-parent-form-behavior
into 110d696 on develop.

@g-saracca g-saracca added the SPA.Q4 Not related to any specific Q4 feature label Nov 1, 2024
@ekraffmiller ekraffmiller self-assigned this Nov 4, 2024
@ekraffmiller
Copy link
Contributor

This change is causing an error in Create Dataset, when the parent collection is not the Root. We need a fix in the Dataverse API to get the correct metadata fields for the Create Dataset form. Added a waiting tag to this issue.
Here is the error:

createDatasetTest.mov

@ekraffmiller ekraffmiller removed their assignment Nov 5, 2024
@g-saracca
Copy link
Contributor Author

@ekraffmiller working great on my end after pulling new unstable dataverse image.

Screen.Recording.2024-11-05.at.14.49.43.mov

@ekraffmiller
Copy link
Contributor

@ekraffmiller working great on my end after pulling new unstable dataverse image.

Screen.Recording.2024-11-05.at.14.49.43.mov

Working for me now too, needed to get the newest image

Copy link
Contributor

@ekraffmiller ekraffmiller 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, approving 👍

@ofahimIQSS ofahimIQSS self-assigned this Nov 6, 2024
@cmbz cmbz added the FY25 Sprint 10 FY25 Sprint 10 (2024-11-06 - 2024-11-20) label Nov 7, 2024
@ofahimIQSS
Copy link
Contributor

No issues found during testing. Merging PR.
Uploading Testing of 540.docx…

@ofahimIQSS ofahimIQSS merged commit 9ec7a9d into develop Nov 8, 2024
10 of 14 checks passed
@ofahimIQSS ofahimIQSS deleted the fix/528-use-fields-from-parent-form-behavior branch November 8, 2024 22:34
@ofahimIQSS ofahimIQSS removed their assignment Nov 8, 2024
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 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) FY25 Sprint 10 FY25 Sprint 10 (2024-11-06 - 2024-11-20) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA: New Collection Page SPA.Q4 Not related to any specific Q4 feature
Projects
Status: Done 🧹
5 participants