Skip to content

Commit 4d27ae4

Browse files
committed
Added filename to the subject of Protocol Action and Document Action email messages.
Fixed a bug that was preventing CC/BCC from being honored. - Legacy-Id: 2604
1 parent 94fedd0 commit 4d27ae4

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

rjs/ietf/idtracker/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ def save(self):
178178
def displayname(self):
179179
return self.filename
180180
def file_tag(self):
181-
return "<%s-%s.txt>" % (self.filename, self.revision_display())
181+
return "<%s>" % (self.filename_with_rev())
182+
def filename_with_rev(self):
183+
return "%s-%s.txt" % (self.filename, self.revision_display())
182184
def group_acronym(self):
183185
return self.group.acronym
184186
def idstate(self):

rjs/ietf/templates/idrfc/approval_mail.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
From: The IESG <iesg-secretary@ietf.org>
22
To: IETF-Announce <ietf-announce@ietf.org>{% if cc %}
33
Cc: {{ cc|safe }}{% endif %}
4-
Subject: {{ action_type }} Action: '{{ doc.title }}' to {{ status }}
4+
Subject: {{ action_type }} Action: '{{ doc.title }}' to {{ status }} ({{ doc.filename_with_rev|safe }})
55

66
{% filter wordwrap:73 %}The IESG has approved the following document{{ docs|pluralize }}:{% for d in docs %}
77
- '{{ d.filled_title }}'
8-
{{ d.file_tag|safe }} as {{ d.full_status }}{% endfor %}
8+
({{ d.filename_with_rev|safe }}) as {{ d.full_status }}{% endfor %}
99

1010
{{ made_by }}
1111

rjs/ietf/utils/mail.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def send_mail_text(request, to, frm, subject, txt, cc=None, extra=None, toUser=N
128128
else:
129129
msg = MIMEText(txt)
130130

131-
send_mail_mime(request, to, frm, subject, msg, cc=None, extra=None, toUser=None, bcc=None)
131+
send_mail_mime(request, to, frm, subject, msg, cc, extra, toUser, bcc)
132132

133133
def send_mail_mime(request, to, frm, subject, msg, cc=None, extra=None, toUser=None, bcc=None):
134134
"""Send MIME message with content already filled in."""
@@ -169,4 +169,5 @@ def send_mail_preformatted(request, preformatted):
169169
extra headers as needed)."""
170170

171171
msg = message_from_string(preformatted.encode("utf-8"))
172+
172173
send_mail_text(request, msg['To'], msg["From"], msg["Subject"], msg.get_payload(), cc=msg["Cc"], bcc=msg["Bcc"])

0 commit comments

Comments
 (0)