-
Notifications
You must be signed in to change notification settings - Fork 175
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
[data_release] Preventing Duplication of File Names #6461
[data_release] Preventing Duplication of File Names #6461
Conversation
@HenriRabalais passed my manual testing. One thing I noticed that might be worth commenting is if a file with the same name exists but has an older version. The newer version of the file with the same name overwrites and which is how the PR intends to solve the issue. I guess the only downfall I can predict is when a user still wanted access to the older version of the file. I'm assuming this is okay though. @ridz1208 |
@maltheism could you re-review/test please ? |
Hi @HenriRabalais, the swal doesn't seem to notify the user anymore when the upload is finished and the swal doesn't go away. All the fields just clear. Is this the intended outcome? The file is updated from testing. |
@maltheism That's strange. I just tested it on my vm again and it's working. Would you be able to provide any more details (exact steps to replicate, any errors, etc.)? In the meantime I'll run some more tests. |
@HenriRabalais I just checked out your PR and tested with an existing file. |
@maltheism Okay. Did it ask you whether you wanted to overwrite or not? Did you click accept? Did you click Cancel? Are there any messages in the console log or in the error log? When I try to overwrite a file it asks me whether I want to overwrite the file, and when I accept a swal appears saying that the file was successfully uploaded, and then the page auto-refreshes. |
@HenriRabalais I'll try it again. |
@HenriRabalais same experience after testing again. I'm first asked by the swal "Are you sure?" and I select "Yes, I am sure!" then it asks me "Are you sure?" about overwriting. I press the button "Yes, I am sure" and I just see the fields for Upload file become empty. My error_log is empty and similar to the console of the browser. The file does get uploaded and the changes are in the table if I quit out of the Upload file view to look. I tested on Chrome. |
@maltheism okay thanks for the details. I've removed the redundant second swal that asks if you want to overwrite the file a second time. For me though, once you click "Yes, I am sure" the file uploads, a swal appears saying "Upload Successful!" and then the page refreshes. I'm also using chrome. |
@HenriRabalais I'll try refreshing the rasinbread data and report back after testing. |
@HenriRabalais latest commit broke make. I believe line 189 is not used. |
@HenriRabalais the success swal happens for me when uploading a file that hasn't been uploaded. I don't see the success swal when I upload the same file twice. I'm testing on my local development machine and so I'm going to test one more time on my VM to see if something different happens. |
@HenriRabalais works on my VM. I'm unsure why the success swal doesn't happen on my development machine. In any case this PR solves the issue. Sorry about the holdup because of my development machine. |
This prevents the duplication of file_names in the data_release table. If there is an attempt to submit a filename that already exists in the table, the user is given the option of overwriting the previous entry. Resolves aces#6435
This prevents the duplication of file_names in the data_release table. If there is an attempt to submit a filename that already exists in the table, the user is given the option of overwriting the previous entry. Resolves aces#6435
Brief summary of changes
This PR Prevents the duplication of file_names in the data_release table. If there is an attempt to submit a filename that already exists in the table, the user is given the option of overwriting the previous entry.
Testing instructions
Part 1
Part 2
Link(s) to related issue(s)