diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2013-05-17 12:23:05 +0200 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-06-16 17:25:44 +0800 |
commit | 4e7b62c51b958acad9d87b435571a22113a43d35 (patch) | |
tree | bfe480694c0df84b5c33c6560eb507c5ec20926e /apps | |
parent | 3c9319711a8b4cc91016043f80129362ab438dfc (diff) | |
download | patchwork-4e7b62c51b958acad9d87b435571a22113a43d35.tar.bz2 patchwork-4e7b62c51b958acad9d87b435571a22113a43d35.tar.xz |
notifications: add project name to patch update notification
Based on a feature request & patch from Wolfram Sang
<wsa@the-dreams.de>.
Notifications may span multiple projects, so include a summary in the
subject line, and detail in the header.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/patchwork/utils.py | 3 |
1 files changed, 3 insertions, 0 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() |