IQSS / dataverse

Open source research data repository software
http://dataverse.org
Other
878 stars 485 forks source link

As a researcher, when I replace a file, I want the file metadata of the replaced file to be used for the new file, so that I don't have to re-enter the file metadata #4380

Closed dliburd closed 3 years ago

dliburd commented 6 years ago

I've come across two a possible issues with file replace I used the "file replace" feature to replace a file with a new one with the same name. The new file was given the "-1" suffix once it is uploaded. Logically this file will be replacing the previous file and won't coexist with the original file, so the "-1" suffix isn't necessary.

When replacing a file the original file's metadata doesn't not carryover. I would expect the files description and tags to be the same as the original file since I'm replacing the file. There is also no warning that the metadata and tags will have to be reentered.

I feel like if I have to reenter the metadata and manually rename the replaced file, I would have just deleted the original file and uploaded the new file.

adam3smith commented 6 years ago

@pdurbin pointed me here so I just wanted to add our user story for keeping the metadata during replace: When we curate, we often want to keep user-supplied file-level metadata like descriptions, but may need to replace the file. Replace would be ideal for this, but of course only if it actually keeps the metadata.

qqmyers commented 6 years ago

FWIW - when we discussed this issue in SEAD, the concern that metadata is about file contents and context, which change when a file is replaced/versioned/copied, made it hard to see how any default would work in all cases, so we planned to ask the user, e.g. to check/uncheck/edit each entry as part of the versioning/replacement/copy workflow. We also considered whether copying the metadata and just warning the user to inspect/edit it as needed would be enough. (We have not yet implemented that but we've had similar feedback that dropping metadata is seen as causing extra work... )

dlmurphy commented 6 years ago

Whether or not we change the functionality of the file replace feature in the future, for now I've at least updated our documentation to make it clear that file replace can not be carried out on a draft dataset, and that when replacing a file, its original metadata will not be carried over.

jggautier commented 6 years ago

The first issue, about Dataverse adding a "-1" suffix to the name of a file that is replacing another file with the same name, has been resolved. So I removed it and renamed this issue to focus on the existing behavior (as of Dataverse 4.9.2)