From a16847ce5836263a1a9739bb324e53ed086e59ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Wed, 17 Jul 2013 15:22:14 +0200 Subject: [PATCH] Added email templates (not finished) and defined the notifiable fields for all models --- greenmine/base/notifications/api.py | 15 ++-- greenmine/base/notifications/models.py | 7 ++ greenmine/scrum/models.py | 71 +++++++++++++++---- .../create_issue_notification-body-html.jinja | 1 + .../create_issue_notification-body-text.jinja | 2 + .../create_issue_notification-subject.jinja | 1 + ...ate_milestone_notification-body-html.jinja | 2 + ...ate_milestone_notification-body-text.jinja | 2 + ...reate_milestone_notification-subject.jinja | 1 + ...reate_project_notification-body-html.jinja | 2 + ...reate_project_notification-body-text.jinja | 2 + .../create_project_notification-subject.jinja | 1 + .../create_task_notification-body-html.jinja | 2 + .../create_task_notification-body-text.jinja | 2 + .../create_task_notification-subject.jinja | 1 + ...te_user_story_notification-body-html.jinja | 2 + ...te_user_story_notification-body-text.jinja | 2 + ...eate_user_story_notification-subject.jinja | 1 + ...destroy_issue_notification-body-html.jinja | 2 + ...destroy_issue_notification-body-text.jinja | 2 + .../destroy_issue_notification-subject.jinja | 1 + ...roy_milestone_notification-body-html.jinja | 2 + ...roy_milestone_notification-body-text.jinja | 2 + ...stroy_milestone_notification-subject.jinja | 1 + ...stroy_project_notification-body-html.jinja | 2 + ...stroy_project_notification-body-text.jinja | 2 + ...destroy_project_notification-subject.jinja | 1 + .../destroy_task_notification-body-html.jinja | 2 + .../destroy_task_notification-body-text.jinja | 2 + .../destroy_task_notification-subject.jinja | 2 + ...oy_user_story_notification-body-html.jinja | 2 + ...oy_user_story_notification-body-text.jinja | 2 + ...troy_user_story_notification-subject.jinja | 2 + .../update_issue_notification-body-html.jinja | 7 ++ .../update_issue_notification-body-text.jinja | 9 +++ .../update_issue_notification-subject.jinja | 1 + ...ate_milestone_notification-body-html.jinja | 8 +++ ...ate_milestone_notification-body-text.jinja | 9 +++ ...pdate_milestone_notification-subject.jinja | 1 + ...pdate_project_notification-body-html.jinja | 8 +++ ...pdate_project_notification-body-text.jinja | 9 +++ .../update_project_notification-subject.jinja | 1 + .../update_task_notification-body-html.jinja | 8 +++ .../update_task_notification-body-text.jinja | 9 +++ .../update_task_notification-subject.jinja | 1 + ...te_user_story_notification-body-html.jinja | 8 +++ ...te_user_story_notification-body-text.jinja | 8 +++ ...date_user_story_notification-subject.jinja | 1 + 48 files changed, 208 insertions(+), 24 deletions(-) diff --git a/greenmine/base/notifications/api.py b/greenmine/base/notifications/api.py index 7509cadc..0c10a269 100644 --- a/greenmine/base/notifications/api.py +++ b/greenmine/base/notifications/api.py @@ -17,17 +17,15 @@ class NotificationSenderMixin(object): def post_save(self, obj, created=False): users = obj.get_watchers_to_notify(self.request.user) context = { - 'changer': self.request.user, - 'changed_fields_dict': obj.get_changed_fields_dict(self.request.DATA), - 'object': obj + "changer": self.request.user, + "object": obj } if created: - #self._send_notification_email(self.create_notification_template, users=users, context=context) - print "TODO: Send the notification email of object creation" + self._send_notification_email(self.create_notification_template, users=users, context=context) else: - #self._send_notification_email(self.update_notification_template, users=users, context=context) - print "TODO: Send the notification email of object modification" + context["changed_fields_dict"] = obj.get_changed_fields_dict(self.request.DATA) + self._send_notification_email(self.update_notification_template, users=users, context=context) def destroy(self, request, *args, **kwargs): users = obj.get_watchers_to_notify(self.request.user) @@ -35,7 +33,6 @@ class NotificationSenderMixin(object): 'changer': self.request.user, 'object': obj } - #self._send_notification_email(self.destroy_notification_template, users=users, context=context) - print "TODO: Send the notification email of object deletion" + self._send_notification_email(self.destroy_notification_template, users=users, context=context) return super(NotificationSenderMixin, self).destroy(request, *args, **kwargs) diff --git a/greenmine/base/notifications/models.py b/greenmine/base/notifications/models.py index 5e933fe9..8e1a6bf3 100644 --- a/greenmine/base/notifications/models.py +++ b/greenmine/base/notifications/models.py @@ -53,6 +53,8 @@ class WatcherMixin(object): class WatchedMixin(object): + notifiable_fields = [] + class Meta: abstract = True @@ -62,6 +64,11 @@ class WatchedMixin(object): return version_list and version_list[0] or None def get_changed_fields_dict(self, data_dict): + if self.notified_fields: + changed_data = dict((k, d[k]) for k in data_dict if k in self.notifiable_fields) + else: + changed_data = data_dict + field_dict = {} for field_name, data_value in data_dict.items(): field_dict.update(self._get_changed_field(field_name, data_value)) diff --git a/greenmine/scrum/models.py b/greenmine/scrum/models.py index c9588d5e..34c974bf 100644 --- a/greenmine/scrum/models.py +++ b/greenmine/scrum/models.py @@ -218,6 +218,15 @@ class Project(models.Model, WatchedMixin): tags = PickledObjectField(null=False, blank=True, verbose_name=_('tags')) + notifiable_fields = [ + "name", + "description", + "owner", + "members", + "public", + "tags", + ] + class Meta: verbose_name = u'project' verbose_name_plural = u'projects' @@ -243,18 +252,6 @@ class Project(models.Model, WatchedMixin): def _get_watchers_by_role(self): return {'owner': self.owner} - def eget_attrinutes_to_notify(self): - return { - 'name': self.name, - 'slug': self.slug, - 'description': self.description, - 'modified_date': self.modified_date, - 'owner': self.owner.get_full_name(), - 'members': ', '.join([member.get_full_name() for member in self.members.all()]), - 'public': self.public, - 'tags': self.tags, - } - @property def list_of_milestones(self): return [{ @@ -293,9 +290,6 @@ class Project(models.Model, WatchedMixin): .exclude(role__id__in=role_ids)\ .delete() - def _get_watchers_by_role(self): - return {'owner': self.owner} - class Milestone(models.Model, WatchedMixin): uuid = models.CharField(max_length=40, unique=True, null=False, blank=True, @@ -323,6 +317,15 @@ class Milestone(models.Model, WatchedMixin): order = models.PositiveSmallIntegerField(default=1, null=False, blank=False, verbose_name=_('order')) + notifiable_fields = [ + "name", + "owner", + "estimated_start", + "estimated_finish", + "closed", + "disponibility", + ] + class Meta: verbose_name = u'milestone' verbose_name_plural = u'milestones' @@ -454,6 +457,19 @@ class UserStory(WatchedMixin, models.Model): tags = PickledObjectField(null=False, blank=True, verbose_name=_('tags')) + notifiable_fields = [ + "milestone", + "owner", + "status", + "points", + "finish_date", + "subject", + "description", + "client_requirement", + "team_requirement", + "tags", + ] + class Meta: verbose_name = u'user story' verbose_name_plural = u'user stories' @@ -559,6 +575,17 @@ class Task(models.Model, WatchedMixin): is_iocaine = models.BooleanField(default=False, null=False, blank=True, verbose_name=_('is iocaine')) + notifiable_fields = [ + "owner", + "status", + "finished_date", + "subject", + "description", + "assigned_to", + "tags", + "is_iocaine", + ] + class Meta: verbose_name = u'task' verbose_name_plural = u'tasks' @@ -638,6 +665,20 @@ class Issue(models.Model, WatchedMixin): tags = PickledObjectField(null=False, blank=True, verbose_name=_('tags')) + notifiable_fields = [ + "owner", + "status", + "severity", + "priority", + "type", + "milestone", + "finished_date", + "subject", + "description", + "assigned_to", + "tags", + ] + class Meta: verbose_name = u'issue' verbose_name_plural = u'issues' diff --git a/greenmine/scrum/templates/emails/create_issue_notification-body-html.jinja b/greenmine/scrum/templates/emails/create_issue_notification-body-html.jinja index e69de29b..677ff739 100644 --- a/greenmine/scrum/templates/emails/create_issue_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/create_issue_notification-body-html.jinja @@ -0,0 +1 @@ +# TODO: {{ changer }} {{ object }} diff --git a/greenmine/scrum/templates/emails/create_issue_notification-body-text.jinja b/greenmine/scrum/templates/emails/create_issue_notification-body-text.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/create_issue_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/create_issue_notification-body-text.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/create_issue_notification-subject.jinja b/greenmine/scrum/templates/emails/create_issue_notification-subject.jinja index e69de29b..58d0eebb 100644 --- a/greenmine/scrum/templates/emails/create_issue_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/create_issue_notification-subject.jinja @@ -0,0 +1 @@ +Create the new Issue "{{ object }}" diff --git a/greenmine/scrum/templates/emails/create_milestone_notification-body-html.jinja b/greenmine/scrum/templates/emails/create_milestone_notification-body-html.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/create_milestone_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/create_milestone_notification-body-html.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/create_milestone_notification-body-text.jinja b/greenmine/scrum/templates/emails/create_milestone_notification-body-text.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/create_milestone_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/create_milestone_notification-body-text.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/create_milestone_notification-subject.jinja b/greenmine/scrum/templates/emails/create_milestone_notification-subject.jinja index e69de29b..9c35e039 100644 --- a/greenmine/scrum/templates/emails/create_milestone_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/create_milestone_notification-subject.jinja @@ -0,0 +1 @@ +Create the new milestone "{{ object }}" diff --git a/greenmine/scrum/templates/emails/create_project_notification-body-html.jinja b/greenmine/scrum/templates/emails/create_project_notification-body-html.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/create_project_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/create_project_notification-body-html.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/create_project_notification-body-text.jinja b/greenmine/scrum/templates/emails/create_project_notification-body-text.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/create_project_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/create_project_notification-body-text.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/create_project_notification-subject.jinja b/greenmine/scrum/templates/emails/create_project_notification-subject.jinja index e69de29b..7feee926 100644 --- a/greenmine/scrum/templates/emails/create_project_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/create_project_notification-subject.jinja @@ -0,0 +1 @@ +Create the new project "{{ object }}" diff --git a/greenmine/scrum/templates/emails/create_task_notification-body-html.jinja b/greenmine/scrum/templates/emails/create_task_notification-body-html.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/create_task_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/create_task_notification-body-html.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/create_task_notification-body-text.jinja b/greenmine/scrum/templates/emails/create_task_notification-body-text.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/create_task_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/create_task_notification-body-text.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/create_task_notification-subject.jinja b/greenmine/scrum/templates/emails/create_task_notification-subject.jinja index e69de29b..bc4f47d6 100644 --- a/greenmine/scrum/templates/emails/create_task_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/create_task_notification-subject.jinja @@ -0,0 +1 @@ +Create the new user story "{{ object }}" diff --git a/greenmine/scrum/templates/emails/create_user_story_notification-body-html.jinja b/greenmine/scrum/templates/emails/create_user_story_notification-body-html.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/create_user_story_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/create_user_story_notification-body-html.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/create_user_story_notification-body-text.jinja b/greenmine/scrum/templates/emails/create_user_story_notification-body-text.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/create_user_story_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/create_user_story_notification-body-text.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/create_user_story_notification-subject.jinja b/greenmine/scrum/templates/emails/create_user_story_notification-subject.jinja index e69de29b..4c42b36f 100644 --- a/greenmine/scrum/templates/emails/create_user_story_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/create_user_story_notification-subject.jinja @@ -0,0 +1 @@ +Create the new task "{{ object }}" diff --git a/greenmine/scrum/templates/emails/destroy_issue_notification-body-html.jinja b/greenmine/scrum/templates/emails/destroy_issue_notification-body-html.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/destroy_issue_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/destroy_issue_notification-body-html.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/destroy_issue_notification-body-text.jinja b/greenmine/scrum/templates/emails/destroy_issue_notification-body-text.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/destroy_issue_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/destroy_issue_notification-body-text.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/destroy_issue_notification-subject.jinja b/greenmine/scrum/templates/emails/destroy_issue_notification-subject.jinja index e69de29b..e5a3caf7 100644 --- a/greenmine/scrum/templates/emails/destroy_issue_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/destroy_issue_notification-subject.jinja @@ -0,0 +1 @@ +Deleted the issue "{{ object }}" diff --git a/greenmine/scrum/templates/emails/destroy_milestone_notification-body-html.jinja b/greenmine/scrum/templates/emails/destroy_milestone_notification-body-html.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/destroy_milestone_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/destroy_milestone_notification-body-html.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/destroy_milestone_notification-body-text.jinja b/greenmine/scrum/templates/emails/destroy_milestone_notification-body-text.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/destroy_milestone_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/destroy_milestone_notification-body-text.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/destroy_milestone_notification-subject.jinja b/greenmine/scrum/templates/emails/destroy_milestone_notification-subject.jinja index e69de29b..f4c6f381 100644 --- a/greenmine/scrum/templates/emails/destroy_milestone_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/destroy_milestone_notification-subject.jinja @@ -0,0 +1 @@ +Deleted the milestone "{{ object }}" diff --git a/greenmine/scrum/templates/emails/destroy_project_notification-body-html.jinja b/greenmine/scrum/templates/emails/destroy_project_notification-body-html.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/destroy_project_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/destroy_project_notification-body-html.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/destroy_project_notification-body-text.jinja b/greenmine/scrum/templates/emails/destroy_project_notification-body-text.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/destroy_project_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/destroy_project_notification-body-text.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/destroy_project_notification-subject.jinja b/greenmine/scrum/templates/emails/destroy_project_notification-subject.jinja index e69de29b..dab1e425 100644 --- a/greenmine/scrum/templates/emails/destroy_project_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/destroy_project_notification-subject.jinja @@ -0,0 +1 @@ +Deleted the project "{{ object }}" diff --git a/greenmine/scrum/templates/emails/destroy_task_notification-body-html.jinja b/greenmine/scrum/templates/emails/destroy_task_notification-body-html.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/destroy_task_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/destroy_task_notification-body-html.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/destroy_task_notification-body-text.jinja b/greenmine/scrum/templates/emails/destroy_task_notification-body-text.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/destroy_task_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/destroy_task_notification-body-text.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/destroy_task_notification-subject.jinja b/greenmine/scrum/templates/emails/destroy_task_notification-subject.jinja index e69de29b..4c21e346 100644 --- a/greenmine/scrum/templates/emails/destroy_task_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/destroy_task_notification-subject.jinja @@ -0,0 +1,2 @@ +Deleted the task "{{ object }}" + diff --git a/greenmine/scrum/templates/emails/destroy_user_story_notification-body-html.jinja b/greenmine/scrum/templates/emails/destroy_user_story_notification-body-html.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/destroy_user_story_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/destroy_user_story_notification-body-html.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/destroy_user_story_notification-body-text.jinja b/greenmine/scrum/templates/emails/destroy_user_story_notification-body-text.jinja index e69de29b..0eda2fcb 100644 --- a/greenmine/scrum/templates/emails/destroy_user_story_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/destroy_user_story_notification-body-text.jinja @@ -0,0 +1,2 @@ +# TODO: {{ changer }} {{ object }} + diff --git a/greenmine/scrum/templates/emails/destroy_user_story_notification-subject.jinja b/greenmine/scrum/templates/emails/destroy_user_story_notification-subject.jinja index e69de29b..8aff3908 100644 --- a/greenmine/scrum/templates/emails/destroy_user_story_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/destroy_user_story_notification-subject.jinja @@ -0,0 +1,2 @@ +Deleted the user story "{{ object }}" + diff --git a/greenmine/scrum/templates/emails/update_issue_notification-body-html.jinja b/greenmine/scrum/templates/emails/update_issue_notification-body-html.jinja index e69de29b..83ae3ce6 100644 --- a/greenmine/scrum/templates/emails/update_issue_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/update_issue_notification-body-html.jinja @@ -0,0 +1,7 @@ +

Updated fields by {{ changer }}:

+ +{# TODO Print the "object" details #} diff --git a/greenmine/scrum/templates/emails/update_issue_notification-body-text.jinja b/greenmine/scrum/templates/emails/update_issue_notification-body-text.jinja index e69de29b..d8240bd0 100644 --- a/greenmine/scrum/templates/emails/update_issue_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/update_issue_notification-body-text.jinja @@ -0,0 +1,9 @@ +Updated fields by {{ changer }}: + +{% for field in changed_fields %} + ** {{ field.verbose_name}}: from "{{ field.old_value}}" to "{{ field.new_value}}". +{% endfor %} + +{# TODO Print the "object" details #} + + diff --git a/greenmine/scrum/templates/emails/update_issue_notification-subject.jinja b/greenmine/scrum/templates/emails/update_issue_notification-subject.jinja index e69de29b..807780b7 100644 --- a/greenmine/scrum/templates/emails/update_issue_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/update_issue_notification-subject.jinja @@ -0,0 +1 @@ +Updated the issue "{{ object }}" diff --git a/greenmine/scrum/templates/emails/update_milestone_notification-body-html.jinja b/greenmine/scrum/templates/emails/update_milestone_notification-body-html.jinja index e69de29b..25526927 100644 --- a/greenmine/scrum/templates/emails/update_milestone_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/update_milestone_notification-body-html.jinja @@ -0,0 +1,8 @@ +

Updated fields by {{ changer }}:

+ +{# TODO Print the "object" details #} + diff --git a/greenmine/scrum/templates/emails/update_milestone_notification-body-text.jinja b/greenmine/scrum/templates/emails/update_milestone_notification-body-text.jinja index e69de29b..d8240bd0 100644 --- a/greenmine/scrum/templates/emails/update_milestone_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/update_milestone_notification-body-text.jinja @@ -0,0 +1,9 @@ +Updated fields by {{ changer }}: + +{% for field in changed_fields %} + ** {{ field.verbose_name}}: from "{{ field.old_value}}" to "{{ field.new_value}}". +{% endfor %} + +{# TODO Print the "object" details #} + + diff --git a/greenmine/scrum/templates/emails/update_milestone_notification-subject.jinja b/greenmine/scrum/templates/emails/update_milestone_notification-subject.jinja index e69de29b..546563c9 100644 --- a/greenmine/scrum/templates/emails/update_milestone_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/update_milestone_notification-subject.jinja @@ -0,0 +1 @@ +Updated the milestone "{{ object }}" diff --git a/greenmine/scrum/templates/emails/update_project_notification-body-html.jinja b/greenmine/scrum/templates/emails/update_project_notification-body-html.jinja index e69de29b..25526927 100644 --- a/greenmine/scrum/templates/emails/update_project_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/update_project_notification-body-html.jinja @@ -0,0 +1,8 @@ +

Updated fields by {{ changer }}:

+ +{# TODO Print the "object" details #} + diff --git a/greenmine/scrum/templates/emails/update_project_notification-body-text.jinja b/greenmine/scrum/templates/emails/update_project_notification-body-text.jinja index e69de29b..d8240bd0 100644 --- a/greenmine/scrum/templates/emails/update_project_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/update_project_notification-body-text.jinja @@ -0,0 +1,9 @@ +Updated fields by {{ changer }}: + +{% for field in changed_fields %} + ** {{ field.verbose_name}}: from "{{ field.old_value}}" to "{{ field.new_value}}". +{% endfor %} + +{# TODO Print the "object" details #} + + diff --git a/greenmine/scrum/templates/emails/update_project_notification-subject.jinja b/greenmine/scrum/templates/emails/update_project_notification-subject.jinja index e69de29b..46a629e2 100644 --- a/greenmine/scrum/templates/emails/update_project_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/update_project_notification-subject.jinja @@ -0,0 +1 @@ +Updated the project "{{ object }}" diff --git a/greenmine/scrum/templates/emails/update_task_notification-body-html.jinja b/greenmine/scrum/templates/emails/update_task_notification-body-html.jinja index e69de29b..25526927 100644 --- a/greenmine/scrum/templates/emails/update_task_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/update_task_notification-body-html.jinja @@ -0,0 +1,8 @@ +

Updated fields by {{ changer }}:

+ +{# TODO Print the "object" details #} + diff --git a/greenmine/scrum/templates/emails/update_task_notification-body-text.jinja b/greenmine/scrum/templates/emails/update_task_notification-body-text.jinja index e69de29b..d8240bd0 100644 --- a/greenmine/scrum/templates/emails/update_task_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/update_task_notification-body-text.jinja @@ -0,0 +1,9 @@ +Updated fields by {{ changer }}: + +{% for field in changed_fields %} + ** {{ field.verbose_name}}: from "{{ field.old_value}}" to "{{ field.new_value}}". +{% endfor %} + +{# TODO Print the "object" details #} + + diff --git a/greenmine/scrum/templates/emails/update_task_notification-subject.jinja b/greenmine/scrum/templates/emails/update_task_notification-subject.jinja index e69de29b..35ca5285 100644 --- a/greenmine/scrum/templates/emails/update_task_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/update_task_notification-subject.jinja @@ -0,0 +1 @@ +Updated the task "{{ object }}" diff --git a/greenmine/scrum/templates/emails/update_user_story_notification-body-html.jinja b/greenmine/scrum/templates/emails/update_user_story_notification-body-html.jinja index e69de29b..25526927 100644 --- a/greenmine/scrum/templates/emails/update_user_story_notification-body-html.jinja +++ b/greenmine/scrum/templates/emails/update_user_story_notification-body-html.jinja @@ -0,0 +1,8 @@ +

Updated fields by {{ changer }}:

+ +{# TODO Print the "object" details #} + diff --git a/greenmine/scrum/templates/emails/update_user_story_notification-body-text.jinja b/greenmine/scrum/templates/emails/update_user_story_notification-body-text.jinja index e69de29b..78481646 100644 --- a/greenmine/scrum/templates/emails/update_user_story_notification-body-text.jinja +++ b/greenmine/scrum/templates/emails/update_user_story_notification-body-text.jinja @@ -0,0 +1,8 @@ +Updated fields by {{ changer }}: + +{% for field in changed_fields %} + ** {{ field.verbose_name}}: from "{{ field.old_value}}" to "{{ field.new_value}}". +{% endfor %} + +{# TODO Print the "object" details #} + diff --git a/greenmine/scrum/templates/emails/update_user_story_notification-subject.jinja b/greenmine/scrum/templates/emails/update_user_story_notification-subject.jinja index e69de29b..5e7ae2aa 100644 --- a/greenmine/scrum/templates/emails/update_user_story_notification-subject.jinja +++ b/greenmine/scrum/templates/emails/update_user_story_notification-subject.jinja @@ -0,0 +1 @@ +Updated the user story "{{ object }}"