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

Remove editVersion calls, standardize restricted file render logic #8902

Conversation

qqmyers
Copy link
Member

@qqmyers qqmyers commented Aug 6, 2022

What this PR does / why we need it: Possibly related to #8845 - use of DatasetPage.dataset.editVersion below in situations where a draft does not exist could dynamically create a new draft. Since the uses here (ui:removed on line 299, but active on line 310 and 334) are just intended to check for restricted files for rendering purposes, it doesn't seem like they should ever result in a new draft on purpose. This PR removes those. Further, in looking through the file, it appears there are several other variations in how the check for the existence of restricted files is being done that all nominally result in the same yes/no answer. I've gone ahead and changed all of those to use the same cached DatasetPage.hasRestrictedFiles parameter for clarity.

Which issue(s) this PR closes:

Closes #8845

Special notes for your reviewer: Some discussion on slack dv-core 8/3/22 but no real decision on priority. Seems like a good follow-up for the next release though.

Suggestions on how to test this: Basically just regression testing of the dataset page license/terms functionality, specifically w.r.t. whether items related to restricted files appear/don't appear or are enabled/disabled the same way as in the current version. Bonus points if you find a way in the pre-PR version to cause a ghost-draft-version to be created (one reason for the PR is to prevent that but no one has seen this effect in practice afaik.)

Does this PR introduce a user interface change? If mockups are available, please link/include them here: explicitly no - should not change expected behavior.

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

Additional documentation:

@kcondon kcondon self-assigned this Aug 8, 2022
@kcondon kcondon merged commit ac49488 into IQSS:develop Aug 9, 2022
@pdurbin pdurbin added this to the 5.12 milestone Aug 26, 2022
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.

Version table always shows DRAFT?
4 participants