Skip to content

Commit e0ce383

Browse files
committed
Merged [4704] from suresh.krishnan@ericsson.com:
When the state changes from whatever to Publication Requested, the regular state change mail will go out. The regular state change mail will be sent to the authors and the wg chairs (this is the current behavior). Now, in addition to this regular state change mail, another mail will be sent with the title 'Publication has been requested for draft <draft-name>' and this mail will be sent to the AD responsible for the WG. I considered sending the mail to both the ADs but decided not to bother the other AD :-). - Legacy-Id: 4711 Note: SVN reference [4704] has been migrated to Git commit fd3a74f
2 parents 21e4b7e + fd3a74f commit e0ce383

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

ietf/ietfworkflows/utils.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,26 @@ def get_notification_receivers(doc, extra_notify):
258258

259259
return res
260260

261+
def get_pubreq_receivers(doc, extra_notify):
262+
res = []
263+
264+
for r in Role.objects.filter(person=doc.group.ad,name__slug='ad'):
265+
res.append(u'"%s" <%s>' % (r.person.plain_name(), r.email.address))
266+
267+
for x in extra_notify:
268+
if not x in res:
269+
res.append(x)
270+
271+
return res
272+
273+
def get_pubreq_cc_receivers(doc):
274+
res = []
275+
276+
for r in Role.objects.filter(group=doc.group, name__in=("chair", "delegate")):
277+
res.append(u'"%s" <%s>' % (r.person.plain_name(), r.email.address))
278+
279+
return res
280+
261281
def update_tags(request, obj, comment, person, set_tags=[], reset_tags=[], extra_notify=[]):
262282
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
263283
doc = Document.objects.get(pk=obj.pk)
@@ -361,6 +381,20 @@ def update_state(request, doc, comment, person, to_state, estimated_date=None, e
361381
person=person,
362382
comment=comment)))
363383

384+
if (to_state.slug=='sub-pub'):
385+
receivers = get_pubreq_receivers(doc, extra_notify)
386+
cc_receivers = get_pubreq_cc_receivers(doc)
387+
388+
send_mail(request, receivers, settings.DEFAULT_FROM_EMAIL,
389+
u"Publication has been requested for draft %s" % doc.name,
390+
'ietfworkflows/state_updated_mail.txt',
391+
dict(doc=doc,
392+
entry=dict(from_state=from_state,
393+
to_state=to_state,
394+
transition_date=doc.time,
395+
person=person,
396+
comment=comment)), cc=cc_receivers)
397+
364398
return
365399

366400
ctype = ContentType.objects.get_for_model(doc)

test/mergedevbranch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ else
138138
echo "This merge has not been committed yet."
139139
echo "To commit it, run this commit command: ../commit-$rev-merge.sh"
140140
echo ""
141-
echo "svn commit -m \"Merged [$rev] from $who: $comment $fix\"" > ../commit-$rev-merge.sh
141+
echo -e "#!/bin/bash\n\nsvn commit -m \"Merged [$rev] from $who: ${comment/\"/'} ${fix/\"/'}\"" > ../commit-$rev-merge.sh
142142
chmod +x ../commit-$rev-merge.sh
143143
fi
144144

0 commit comments

Comments
 (0)