-
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
Assign selected files to identified Thesis #708
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-8-transfer-processing-4
branch
from
May 17, 2021 21:46
a360044
to
e3704cb
Compare
matt-bernhardt
force-pushed
the
etd-8-transfer-processing-4
branch
from
May 17, 2021 21:56
e3704cb
to
5ddda5f
Compare
matt-bernhardt
force-pushed
the
etd-8-transfer-processing-4
branch
from
May 18, 2021 15:16
5ddda5f
to
7c867f5
Compare
matt-bernhardt
requested review from
JPrevost and
jazairi
and removed request for
JPrevost and
jazairi
May 18, 2021 15:31
** Why are these changes being introduced: * Submitting the transfer processing form, with files and a thesis selected, needs to cause those files to actually be assigned to the chosen thesis. The original affiliation between those files and their transfer should be retained. ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/ETD-281 ** How does this address that need: * This expands the files method on the Transfer controller to attach the blob for each file to the selected Thesis record. The flash message sent back to the user is updated to reflect this work (replacing the test message used previously). * In order to provide a meaningful summary to the processor on the Transfer queue page, a new "unassigned_files" method is added to the Transfer model. This returns the count of files which are only attached to _one_ record (i.e the Transfer itself). This count is now displayed on the Transfer queue alongside the total number of files, i.e. "4 / 10" reflecting four of the original ten files still need transferred. * The display of the Transfer processing form itself still lists all received files, but those already assigned to a Thesis are now crossed out, with the title of the Thesis displayed. * The unassigned_files method is now tested at the model and controller level. ** Document any side effects to this change: * The logic is a little messier, with the Transfer controller calling Thesis.files.attach to actually do the work - but I don't see a way to avoid that at some level. For now, I've tried to focus this work on the Transfer side of things, but I'm open to other approaches.
matt-bernhardt
force-pushed
the
etd-8-transfer-processing-4
branch
from
May 18, 2021 15:53
7c867f5
to
175a21b
Compare
JPrevost
requested changes
May 19, 2021
JPrevost
approved these changes
May 19, 2021
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 makes the Transfer processing form actually do work, attaching selected files from a Transfer to the Thesis record identified by the user.
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