Merged [2673] from rjsparks@nostrum.com:
Refined the email sent when an position changes. Added a helper to Position to get the current position description as a string This fixes issue #547. - Legacy-Id: 2674 Note: SVN reference [2673] has been migrated to Git commit 770429b398a9480a5367066d43d9c503d8fdae4a
This commit is contained in:
parent
dc833b4492
commit
c20d969eaf
|
@ -228,11 +228,15 @@ def send_ballot_comment(request, name):
|
|||
c = comment.text
|
||||
subj.append("COMMENT")
|
||||
|
||||
|
||||
ad_name = str(ad)
|
||||
ad_name_genitive = ad_name + "'" if ad_name.endswith('s') else ad_name + "'s"
|
||||
subject = "%s %s on %s" % (ad_name_genitive, " and ".join(subj), doc.filename + '-' + doc.revision_display())
|
||||
subject = "%s %s on %s" % (ad_name_genitive, pos.name() if pos else "No Position" , doc.filename + '-' + doc.revision_display())
|
||||
if subj:
|
||||
subject += ": (with "+" and ".join(subj)+")"
|
||||
|
||||
body = render_to_string("idrfc/ballot_comment_mail.txt",
|
||||
dict(discuss=d, comment=c, ad=ad, doc=doc))
|
||||
dict(discuss=d, comment=c, ad=ad, doc=doc, pos=pos))
|
||||
frm = u"%s <%s>" % ad.person.email()
|
||||
to = "The IESG <iesg@ietf.org>"
|
||||
|
||||
|
|
|
@ -710,6 +710,20 @@ class Position(models.Model):
|
|||
return 'X'
|
||||
else:
|
||||
return ' '
|
||||
def name(self):
|
||||
positions = {"yes":"Yes",
|
||||
"noobj":"No Objection",
|
||||
"discuss":"Discuss",
|
||||
"abstain":"Abstain",
|
||||
"recuse":"Recuse"}
|
||||
p = None
|
||||
for k,v in positions.iteritems():
|
||||
if self.__dict__[k] > 0:
|
||||
p = v
|
||||
if not p:
|
||||
p = "No Record"
|
||||
return p
|
||||
|
||||
class Meta:
|
||||
db_table = 'ballots'
|
||||
unique_together = (('ballot', 'ad'), )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{ ad }} has entered the following ballot position for
|
||||
{{ doc.filename }}-{{ doc.revision_display }}.
|
||||
{{ doc.filename }}-{{ doc.revision_display }}: {{ pos.name }}
|
||||
|
||||
When responding, please keep the subject line intact and reply to all
|
||||
email addresses included in the To and CC lines. (Feel free to cut this
|
||||
|
@ -8,6 +8,9 @@ introductory paragraph, however.)
|
|||
Please refer to http://www.ietf.org/iesg/statement/discuss-criteria.html
|
||||
for more information about IESG DISCUSS and COMMENT positions.
|
||||
|
||||
{% if not discuss and not comment %}
|
||||
There is no DISCUSS or COMMENT text associated with this position.
|
||||
{% endif %}
|
||||
|
||||
{% if discuss %}----------------------------------------------------------------------
|
||||
DISCUSS:
|
||||
|
|
Loading…
Reference in a new issue