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

IQSS/8431 Optional Version Note #11068

Open
wants to merge 48 commits into
base: develop
Choose a base branch
from

Conversation

qqmyers
Copy link
Member

@qqmyers qqmyers commented Dec 6, 2024

What this PR does / why we need it: This PR adds a version note to be able to record the reason a version was created/how it differs from the prior version. The functionality is optional (turned on via a feature flag.

Per tech hour discussion, in addition, an attempt has been made to clear some technical debt - where the reason for deacccessioning was stored in a column called versionnote, and the forwarding url for the deaccessioned version was stored in the archivenote field, while there was also a deaccessionlink column that appears to have the same purpose but is only visible in the API/JSON output for a dataset version.

Which issue(s) this PR closes:

Special notes for your reviewer: AFAIK, the deaccessionlink column was only used in v3 while the archivenote field was used in v4/in the deaccession UI. It looks like at one point (~v4.13) there was an attempt to validate the archiveNote to require a URL but there were legacy values that are not URLs so that was disabled. In cleaning things up, I've added steps in the flyway script to combine the deaccessionlink and archivenote fields (presumably only one was ever filled out for any given datasetversion) and to address the non-url legacy values in the UI by not trying to turn them into a link as is done now (presumably causing some error/broken link).

Suggestions on how to test this: Regression test that deaccessioning still works, existing deaccession reason and forwarding URLs appear for existing/older deaccessioned datasets (and new ones). Then turn on the feature via the enable-version-note feature flag. Verify that a version Note can be added when viewing a draft version via the version table on the dataset page, as well as during publication. Verify that the API can be used to add a versionNote to draft (for those who can edit the dataset) and for any version for superusers, e.g.
curl -X PUT -d 'No substantive changes were made in the project. Depositor replaced files with new versions correcting typos' http://localhost:8080/api/datasets/<id>/versions/2.0/versionNote -H "X-Dataverse-Key:$KEY"

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

image

393402921-a802f2cd-457a-4cf3-b6d3-4334a5033bcb

(images from QDR)
Is there a release notes update needed for this change?: included

Additional documentation: user/api docs tbd

@qqmyers qqmyers marked this pull request as ready for review December 6, 2024 18:35
IQSS/8431_Version_Creation_Note
@coveralls
Copy link

coveralls commented Dec 12, 2024

Coverage Status

coverage: 22.578% (+0.007%) from 22.571%
when pulling c53ba93 on QualitativeDataRepository:IQSS/8431_Version_Creation_Note
into e3b5795 on IQSS:develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add versioning notes to metadata
3 participants