Skip to content

Commit 049b649

Browse files
committed
Notify shepherd (and wg chairs and delegates) by email if 'Doc Shepherd Follow-up Underway' is updated. Fixes ietf-tools#561
- Legacy-Id: 2748
1 parent 837d9f6 commit 049b649

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

ietf/ietfworkflows/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ def notify_entry(entry, template, extra_notify=[]):
146146
to=mail_list,
147147
from_email=settings.DEFAULT_FROM_EMAIL)
148148
# Only send emails if we are not debug mode
149-
print body
150149
if not settings.DEBUG:
151150
mail.send()
152151
return mail

ietf/wgchairs/forms.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,14 +346,15 @@ def __init__(self, *args, **kwargs):
346346
else:
347347
self.doc_writeup=None
348348
super(WriteUpEditForm, self).__init__(*args, **kwargs)
349+
self.person = get_person_for_user(self.user)
349350

350351
def get_writeup(self):
351352
return self.data.get('writeup', self.doc_writeup and self.doc_writeup.writeup or '')
352353

353354
def save(self):
354355
if not self.doc_writeup:
355356
self.doc_writeup = ProtoWriteUp.objects.create(
356-
person=get_person_for_user(self.user),
357+
person=self.person,
357358
draft=self.doc,
358359
writeup=self.cleaned_data['writeup'])
359360
else:
@@ -362,10 +363,15 @@ def save(self):
362363
if self.data.get('modify_tag', False):
363364
followup = self.cleaned_data.get('followup', False)
364365
comment = self.cleaned_data.get('comment', False)
366+
shepherd = self.doc.shepherd
367+
if shepherd:
368+
extra_notify = ['%s <%s>' % shepherd.email()]
369+
else:
370+
extra_notify = []
365371
if followup:
366-
update_tags(self.doc, comment, set_tags=[FOLLOWUP_TAG])
372+
update_tags(self.doc, comment, self.person, set_tags=[FOLLOWUP_TAG], extra_notify=extra_notify)
367373
else:
368-
update_tags(self.doc, comment, reset_tags=[FOLLOWUP_TAG])
374+
update_tags(self.doc, comment, self.person, reset_tags=[FOLLOWUP_TAG], extra_notify=extra_notify)
369375
return self.doc_writeup
370376

371377
def is_valid(self):

0 commit comments

Comments
 (0)