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 fd3a74fa1f
This commit is contained in:
commit
e0ce3838d9
|
@ -258,6 +258,26 @@ def get_notification_receivers(doc, extra_notify):
|
|||
|
||||
return res
|
||||
|
||||
def get_pubreq_receivers(doc, extra_notify):
|
||||
res = []
|
||||
|
||||
for r in Role.objects.filter(person=doc.group.ad,name__slug='ad'):
|
||||
res.append(u'"%s" <%s>' % (r.person.plain_name(), r.email.address))
|
||||
|
||||
for x in extra_notify:
|
||||
if not x in res:
|
||||
res.append(x)
|
||||
|
||||
return res
|
||||
|
||||
def get_pubreq_cc_receivers(doc):
|
||||
res = []
|
||||
|
||||
for r in Role.objects.filter(group=doc.group, name__in=("chair", "delegate")):
|
||||
res.append(u'"%s" <%s>' % (r.person.plain_name(), r.email.address))
|
||||
|
||||
return res
|
||||
|
||||
def update_tags(request, obj, comment, person, set_tags=[], reset_tags=[], extra_notify=[]):
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
doc = Document.objects.get(pk=obj.pk)
|
||||
|
@ -361,6 +381,20 @@ def update_state(request, doc, comment, person, to_state, estimated_date=None, e
|
|||
person=person,
|
||||
comment=comment)))
|
||||
|
||||
if (to_state.slug=='sub-pub'):
|
||||
receivers = get_pubreq_receivers(doc, extra_notify)
|
||||
cc_receivers = get_pubreq_cc_receivers(doc)
|
||||
|
||||
send_mail(request, receivers, settings.DEFAULT_FROM_EMAIL,
|
||||
u"Publication has been requested for draft %s" % doc.name,
|
||||
'ietfworkflows/state_updated_mail.txt',
|
||||
dict(doc=doc,
|
||||
entry=dict(from_state=from_state,
|
||||
to_state=to_state,
|
||||
transition_date=doc.time,
|
||||
person=person,
|
||||
comment=comment)), cc=cc_receivers)
|
||||
|
||||
return
|
||||
|
||||
ctype = ContentType.objects.get_for_model(doc)
|
||||
|
|
|
@ -138,7 +138,7 @@ else
|
|||
echo "This merge has not been committed yet."
|
||||
echo "To commit it, run this commit command: ../commit-$rev-merge.sh"
|
||||
echo ""
|
||||
echo "svn commit -m \"Merged [$rev] from $who: $comment $fix\"" > ../commit-$rev-merge.sh
|
||||
echo -e "#!/bin/bash\n\nsvn commit -m \"Merged [$rev] from $who: ${comment/\"/'} ${fix/\"/'}\"" > ../commit-$rev-merge.sh
|
||||
chmod +x ../commit-$rev-merge.sh
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue