Skip to content
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

Merged
merged 1 commit into from
Apr 15, 2021
Merged

Conversation

matt-bernhardt
Copy link
Member

@matt-bernhardt matt-bernhardt commented Apr 12, 2021

This implements the transfer success email, with associated tests.

Developer

  • All new ENV is documented in README
  • All new ENV has been added to Heroku Pipeline, Staging and Prod
  • ANDI or Wave has been run in accordance to
    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)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • There are appropriate tests covering any new functionality
  • The documentation has been updated or is unnecessary
  • The changes have been verified
  • New dependencies are appropriate or there were no changes

Requires database migrations?

NO

Includes new or updated dependencies?

NO

@matt-bernhardt matt-bernhardt marked this pull request as draft April 12, 2021 20:43
@mitlib mitlib temporarily deployed to thesis-submit-pr-691 April 12, 2021 20:43 Inactive
@coveralls
Copy link

coveralls commented Apr 12, 2021

Coverage Status

Coverage increased (+0.04%) to 94.513% when pulling 8424292 on etd-79-transfer-success-email into faf8877 on main.

@matt-bernhardt matt-bernhardt temporarily deployed to thesis-submit-pr-691 April 13, 2021 19:11 Inactive
@matt-bernhardt matt-bernhardt force-pushed the etd-79-transfer-success-email branch from a937cd1 to c8cd60d Compare April 14, 2021 14:48
@matt-bernhardt matt-bernhardt temporarily deployed to thesis-submit-pr-691 April 14, 2021 14:49 Inactive
@matt-bernhardt matt-bernhardt temporarily deployed to thesis-submit-pr-691 April 14, 2021 15:07 Inactive
@matt-bernhardt matt-bernhardt temporarily deployed to thesis-submit-pr-691 April 14, 2021 16:13 Inactive
@matt-bernhardt matt-bernhardt temporarily deployed to thesis-submit-pr-691 April 14, 2021 17:56 Inactive
@matt-bernhardt matt-bernhardt temporarily deployed to thesis-submit-pr-691 April 14, 2021 19:02 Inactive
@matt-bernhardt matt-bernhardt temporarily deployed to thesis-submit-pr-691 April 14, 2021 19:30 Inactive
** 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.
@matt-bernhardt matt-bernhardt force-pushed the etd-79-transfer-success-email branch from 8f1a077 to 8424292 Compare April 14, 2021 19:44
@matt-bernhardt matt-bernhardt temporarily deployed to thesis-submit-pr-691 April 14, 2021 19:44 Inactive
@matt-bernhardt matt-bernhardt marked this pull request as ready for review April 14, 2021 19:44
@JPrevost JPrevost self-assigned this Apr 15, 2021
@@ -0,0 +1,23 @@
<p>Hello <%= @user.given_name %>,</p>
Copy link
Member

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
Copy link
Member

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.

@matt-bernhardt matt-bernhardt merged commit e0ee17c into main Apr 15, 2021
@matt-bernhardt matt-bernhardt deleted the etd-79-transfer-success-email branch April 15, 2021 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants