diff --git a/ietf/doc/models.py b/ietf/doc/models.py index e5e304245..8fd884866 100644 --- a/ietf/doc/models.py +++ b/ietf/doc/models.py @@ -636,6 +636,9 @@ class DocEvent(models.Model): doc = models.ForeignKey('doc.Document') desc = models.TextField() + def get_dochistory(self): + return DocHistory.objects.filter(time__lte=self.time,doc__name=self.doc.name).order_by('-time').first() + def __unicode__(self): return u"%s %s by %s at %s" % (self.doc.name, self.get_type_display().lower(), self.by.plain_name(), self.time) diff --git a/ietf/templates/doc/document_ballot_content.html b/ietf/templates/doc/document_ballot_content.html index 06ca17a41..cf629aa9a 100644 --- a/ietf/templates/doc/document_ballot_content.html +++ b/ietf/templates/doc/document_ballot_content.html @@ -61,12 +61,12 @@

{% if p.old_ad %}[{% endif %}{{ p.ad.plain_name }}{% if p.old_ad %}]{% endif %}

{% if p.pos.blocking and p.discuss %} -

{{ p.pos.name }} ({{ p.discuss_time|date:"Y-m-d" }} for - {{ doc.rev }})

+

{{ p.pos.name }} ({{ p.discuss_time|date:"Y-m-d" }} for {{ p.get_dochistory.rev }})

{{ p.discuss|wrap_text:80 }}
{% endif %} {% if p.comment %} -

Comment ({{ p.comment_time|date:"Y-m-d" }} for - {{ doc.rev }})

+

Comment ({{ p.comment_time|date:"Y-m-d" }} for - {{ p.get_dochistory.rev }})

{{ p.comment|wrap_text:80 }}
{% endif %} {% endfor %}