-
Notifications
You must be signed in to change notification settings - Fork 4
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
Prototype for removing files from a thesis #725
Merged
Merged
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
matt-bernhardt
force-pushed
the
etd-307-unlink-files
branch
from
June 24, 2021 18:58
b33610f
to
91c9033
Compare
matt-bernhardt
force-pushed
the
etd-307-unlink-files
branch
from
June 25, 2021 13:57
8c61556
to
b176a14
Compare
matt-bernhardt
force-pushed
the
etd-307-unlink-files
branch
from
June 25, 2021 18:47
b176a14
to
012df8c
Compare
matt-bernhardt
force-pushed
the
etd-307-unlink-files
branch
from
June 25, 2021 19:15
012df8c
to
5e9b4ee
Compare
JPrevost
reviewed
Jun 25, 2021
JPrevost
reviewed
Jun 28, 2021
JPrevost
reviewed
Jun 28, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made a few comments / suggestions. I'm happy to discuss them to determine which ones are worth addressing now and which we can just say "yup" and ignore for now.
JPrevost
approved these changes
Jun 29, 2021
** Why are these changes being introduced: * There are scenarios wherein a file will be attached to a thesis, and will need to be removed (either through user error, or the submission of updated copies). ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/ETD-307 ** How does this address that need: * This uses the existing SimpleForm feature for removing linked records to enable a "remove" link on each file in the thesis processing form. Testing has shown that this will not remove the file from S3, as it will still be attached to the transfer which originally contained it. * Tests of this scenario have been added, to ensure that the resulting flash message has a link back to the transfer. * An additional test to make sure that untargeted files are not affected has also been added. ** Document any side effects to this change: * There is a new partial in the thesis folder, having taken the file table fields that used to be in the form template and made them into their own partial. This is the pattern used for other add-another fields. * There is now a setup method in the thesis controller tests, similar to that used on the transfer controller.
matt-bernhardt
force-pushed
the
etd-307-unlink-files
branch
from
June 29, 2021 14:03
29dccf3
to
ec24803
Compare
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.
This implements the ability to remove a file from a thesis, using the existing link_to_remove_association feature provided by SImpleForm. This allows the user to use an existing UI affordance that is already present in other fields to remove a file, in such a way that it remains in the S3 bucket and attached to its original transfer record.
The user will see a flash message with a link back to that Transfer, allowing them to click the link and get back to it, putting the file in its proper location.
Because the file blob is still attached to its Transfer record, it does not get deleted through this process - and it can still be placed into its correct destination from the transfer processing form.
Ticket
https://mitlibraries.atlassian.net/browse/ETD-307
Developer
our guide and
all issues introduced by these changes have been resolved or opened as new
issues (link to those issues in the Pull Request details above)
Code Reviewer
(not just this pull request message)
Requires database migrations?
NO
Includes new or updated dependencies?
NO