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

#6948 check file labels on new draft #7016

Merged
merged 1 commit into from Jul 2, 2020
Merged

Conversation

sekmiller
Copy link
Contributor

What this PR does / why we need it:
Fixes a bug in which duplicate file names are allowed to saved in the case where the user is creating a new dataset version with the file upload.

Which issue(s) this PR closes:

Closes #6948

Special notes for your reviewer:
Pretty simple, I added a transient boolean to the file metadata to mark a metadata as existing in the previous version - the code had relied on the file metadata id for this, but it is null when a new edit version is created.

Suggestions on how to test this:
Upload a file that has the same name as a file in the current version of a dataset (but not the same content, because we aren't allowing that in dev, yet) and see that the file gets a -1 or -2 etc as applicable. This should happen in the file upload is done to a published version or an existing draft version.

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. It's a fairly minor bug fix

Additional documentation:
None

@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 19.562% when pulling b72fb31 on 6948-duplicate-file-name into b97185a on develop.

@sekmiller sekmiller added this to the Dataverse 5 milestone Jun 24, 2020
@pdurbin pdurbin self-assigned this Jun 25, 2020
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from Code Review 🦁 to QA 🔎✅ Jun 25, 2020
@pdurbin pdurbin removed their assignment Jun 25, 2020
@kcondon kcondon self-assigned this Jul 2, 2020
@kcondon kcondon merged commit 2f193c1 into develop Jul 2, 2020
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from QA 🔎✅ to Done 🚀 Jul 2, 2020
@kcondon kcondon deleted the 6948-duplicate-file-name branch July 2, 2020 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Upload file to published version (creating a draft) incorrectly allows same file name
4 participants