Skip to content

Commit 9aefd3d

Browse files
committed
Fixed the saving of shepherd writeups for documents in iesg processing without
a stream state (ad-sponsored documents). Fixes issue ietf-tools#1186 and ietf-tools#1187. - Legacy-Id: 6697
1 parent 1c428e6 commit 9aefd3d

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

ietf/doc/views_draft.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# changing state and metadata on Internet Drafts
22

33
import re, os, datetime
4+
from textwrap import dedent
45

56
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden, Http404
67
from django.shortcuts import render_to_response, get_object_or_404
@@ -374,9 +375,17 @@ def replaces(request, name):
374375
old_replaces_names = ", ".join([d.name for d in old_replaces])
375376
if not old_replaces_names:
376377
old_replaces_names = "None"
377-
e.desc = u"Set of documents this document replaces changed to <b>%s</b> from %s"% (new_replaces_names, old_replaces_names)
378+
e.desc = dedent(u"""
379+
The set of documents which are replaced by %s has been updated:
380+
381+
Old:
382+
%s
383+
384+
New:
385+
%s
386+
""" % (doc.name, old_replaces_names, new_replaces_names))
378387
e.save()
379-
email_desc = e.desc
388+
email_desc = e.desc.replace(", ", "\n ")
380389
if comment:
381390
c = DocEvent(doc=doc,by=login,type="added_comment")
382391
c.desc = comment
@@ -393,7 +402,7 @@ def replaces(request, name):
393402
email_string = ", ".join(email_list)
394403
send_mail(request, email_string,
395404
"DraftTracker Mail System <iesg-secretary@ietf.org>",
396-
"%s updated by %s" % (doc.file_tag, login),
405+
"%s updated by %s" % (doc.name, login),
397406
"doc/mail/change_notice.txt",
398407
dict(text=html_to_text(email_desc),
399408
doc=doc,
@@ -995,8 +1004,9 @@ def edit_shepherd_writeup(request, name):
9951004
e = WriteupDocEvent(doc=doc, by=login, type="changed_protocol_writeup")
9961005

9971006
# Add the shepherd writeup to description if the document is in submitted for publication state
998-
state = doc.get_state("draft-stream-%s" % doc.stream_id)
999-
if (state.slug=='sub-pub'):
1007+
stream_state = doc.get_state("draft-stream-%s" % doc.stream_id)
1008+
iesg_state = doc.get_state("draft-iesg")
1009+
if (iesg_state or (stream_state and stream_state.slug=='sub-pub')):
10001010
e.desc = writeup
10011011
else:
10021012
e.desc = "Changed document writeup"

0 commit comments

Comments
 (0)