diff options
-rw-r--r-- | apps/patchwork/utils.py | 3 | ||||
-rw-r--r-- | templates/patchwork/patch-change-notification-subject.text | 2 | ||||
-rw-r--r-- | templates/patchwork/patch-change-notification.mail | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/apps/patchwork/utils.py b/apps/patchwork/utils.py index f48e7a5..f8fee3f 100644 --- a/apps/patchwork/utils.py +++ b/apps/patchwork/utils.py @@ -175,6 +175,7 @@ def send_notifications(): for (recipient, notifications) in groups: notifications = list(notifications) + projects = set([ n.patch.project.linkname for n in notifications ]) def delete_notifications(): PatchChangeNotification.objects.filter( @@ -188,7 +189,9 @@ def send_notifications(): 'site': Site.objects.get_current(), 'person': recipient, 'notifications': notifications, + 'projects': projects, } + subject = render_to_string( 'patchwork/patch-change-notification-subject.text', context).strip() diff --git a/templates/patchwork/patch-change-notification-subject.text b/templates/patchwork/patch-change-notification-subject.text index 02ee55b..c9d96d4 100644 --- a/templates/patchwork/patch-change-notification-subject.text +++ b/templates/patchwork/patch-change-notification-subject.text @@ -1 +1 @@ -Patch update notification: {{notifications|length}} patch{{notifications|length|pluralize:"es"}} updated +[{{ projects|join:"," }}] Patch notification: {{notifications|length}} patch{{notifications|length|pluralize:"es"}} updated diff --git a/templates/patchwork/patch-change-notification.mail b/templates/patchwork/patch-change-notification.mail index 19a2a09..b7e2cfe 100644 --- a/templates/patchwork/patch-change-notification.mail +++ b/templates/patchwork/patch-change-notification.mail @@ -2,8 +2,9 @@ Hello, The following patch{{notifications|length|pluralize:"es"}} (submitted by you) {{notifications|length|pluralize:"has,have"}} been updated in patchwork: {% for notification in notifications %} - * {{notification.patch.name|safe}} + * {{notification.patch.project.linkname}}: {{notification.patch.name|safe}} - http://{{site.domain}}{{notification.patch.get_absolute_url}} + - for: {{notification.patch.project.name}} was: {{notification.orig_state}} now: {{notification.patch.state}} {% endfor %} |