Merged [6641] from bartosz.balazinski@interdigital.com:

Added the new version of the shepherd writeup as a comment when it's edited.
The new version works like this:

 -  Any shepherd writeups done before the document is submitted for
    publication are not disclosed in the history.

 -  When the document is submitted for publication the available writeup (if
    available) is added to history.

 -  Any further writeups after the document has been submitted for publication
    are disclosed in the history.
 - Legacy-Id: 6662
Note: SVN reference [6641] has been migrated to Git commit a0a451881b
This commit is contained in:
Henrik Levkowetz 2013-11-06 16:06:07 +00:00
commit 27895541a4

View file

@ -578,6 +578,11 @@ def to_iesg(request,name):
doc.notify = notify
changes.append("State Change Notice email list changed to %s" % doc.notify)
# Get the last available writeup
previous_writeup = doc.latest_event(WriteupDocEvent,type="changed_protocol_writeup")
if previous_writeup != None:
changes.append(previous_writeup.text)
for c in changes:
e = DocEvent(doc=doc, by=login)
e.desc = c
@ -987,9 +992,15 @@ def edit_shepherd_writeup(request, name):
writeup = from_file
else:
writeup = form.cleaned_data['content']
e = WriteupDocEvent(doc=doc, by=login, type="changed_protocol_writeup")
e.desc = "Changed document writeup"
# Add the shepherd writeup to description if the document is in submitted for publication state
state = doc.get_state("draft-stream-%s" % doc.stream_id)
if (state.slug=='sub-pub'):
e.desc = writeup
else:
e.desc = "Changed document writeup"
e.text = writeup
e.save()