-
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
Implement transfer receipt email #691
Conversation
a937cd1
to
c8cd60d
Compare
** Why are these changes being introduced: * Staff who submit batches of thesis files to the Libraries as a bulk Transfer record should receive an email confirming their receipt. ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/ETD-79 ** How does this address that need: * This adds a transfer_receipt_email method to the ReceiptMailer class, with an associated view template and tests. ** Document any side effects to this change: * It may be a good idea to update the name of the thesis receipt method to something specific to theses. Right now the ReceiptMailer class has two methods: receipt_email (for theses) and transfer_receipt_email (for transfers). * The testing approach for this email is slightly different than what we use for the thesis email. This is intentional, and the result of some difficulty. Future-us may take another pass at it, perhaps.
8f1a077
to
8424292
Compare
@@ -0,0 +1,23 @@ | |||
<p>Hello <%= @user.given_name %>,</p> |
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.
Ugh, why do we continue to insist on using names when they aren't necessary :|
@@ -7,4 +7,13 @@ def receipt_email(thesis, user) | |||
to: @user.email, | |||
subject: 'Your thesis information submission') | |||
end | |||
|
|||
def transfer_receipt_email(transfer, user) | |||
return unless ENV.fetch('DISABLE_ALL_EMAIL', 'true') == 'false' # allows PR builds to disable emails |
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 know this logic works and is the same in the other mailer so I'm not suggesting we change it... but also it hurts my brain.
This implements the transfer success email, with associated tests.
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