Skip to content

Commit

Permalink
Merge pull request #544 from uw-it-aca/hotfix/prt-30
Browse files Browse the repository at this point in the history
notification subject text
mikeseibel authored Mar 28, 2024
2 parents 5c4d031 + d6a4f1a commit d2b8c40
Showing 2 changed files with 6 additions and 11 deletions.
13 changes: 4 additions & 9 deletions endorsement/dao/notification.py
Original file line number Diff line number Diff line change
@@ -243,9 +243,7 @@ def _create_invalid_endorser_message(endorsements):

params['services'] = list(services.keys())

subject = "{0}{1}".format(
"Action Required: Services that you provisioned for other ",
"UW NetIDs will be revoked soon")
subject = "Action Required: Provisioned UW-IT services will expire soon"

text_template = "email/invalid_endorser.txt"
html_template = "email/invalid_endorser.html"
@@ -312,15 +310,12 @@ def _create_expire_notice_message(notice_level, lifetime, endorsed):
context['impacts'].append(impact_statement)

if notice_level < 4:
subject = "{0}{1}".format(
"Action Required: UW-IT services that you provisioned access to ",
"for other UW NetIDs will expire soon")
subject = ("Action Required: Provisioned UW-IT "
"services will expire soon")
text_template = "email/notice_warning.txt"
html_template = "email/notice_warning.html"
else:
subject = "{0}{1}".format(
"Action Required: UW-IT services that you provisioned access to ",
"for other UW NetIDs have expired")
subject = "Action Required: Provisioned UW-IT services have expired"
text_template = "email/notice_warning_final.txt"
html_template = "email/notice_warning_final.html"

4 changes: 2 additions & 2 deletions endorsement/test/dao/test_notification.py
Original file line number Diff line number Diff line change
@@ -127,8 +127,8 @@ def test_invalid_endorser_notification_message_single(self):
notify_invalid_endorser(endorsements)
self.assertEqual(len(mail.outbox), 1)
self.assertEqual(
mail.outbox[0].subject[:46],
'Action Required: Services that you provisioned')
mail.outbox[0].subject,
'Action Required: Provisioned UW-IT services will expire soon')
self.assertTrue(
service.category_name in mail.outbox[0].body)
self.assertTrue(

0 comments on commit d2b8c40

Please sign in to comment.