-
Notifications
You must be signed in to change notification settings - Fork 492
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
qqmyers
wants to merge
52
commits into
IQSS:develop
Choose a base branch
from
QualitativeDataRepository:IQSS/8431_Version_Creation_Note
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
IQSS/8431 Optional Version Note #11068
qqmyers
wants to merge
52
commits into
IQSS:develop
from
QualitativeDataRepository:IQSS/8431_Version_Creation_Note
Conversation
This file contains 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: 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:
(images from QDR)
Is there a release notes update needed for this change?: included
Additional documentation: user/api docs tbd