Previous IPR information in last call announcements could be incomplete. Use a better search for IPR declarations related to a document, and include the IPR information in the last call preview.
- Legacy-Id: 3084
This commit is contained in:
parent
101fe5f3dd
commit
663113d6fa
|
@ -6,9 +6,11 @@ from datetime import datetime, date, time, timedelta
|
|||
from django.template.loader import render_to_string
|
||||
from django.utils.html import strip_tags
|
||||
from django.conf import settings
|
||||
from django.core.urlresolvers import reverse as urlreverse
|
||||
|
||||
from ietf.utils.mail import send_mail, send_mail_text
|
||||
from ietf.idtracker.models import *
|
||||
from ietf.ipr.search import iprs_from_docs
|
||||
|
||||
def email_state_changed(request, doc, text):
|
||||
to = [x.strip() for x in doc.idinternal.state_change_notice_to.replace(';', ',').split(',')]
|
||||
|
@ -74,6 +76,13 @@ def generate_last_call_announcement(request, doc):
|
|||
d.filled_title = textwrap.fill(d.title, width=70, subsequent_indent=" " * 3)
|
||||
urls.append(settings.IDTRACKER_BASE_URL + d.idinternal.get_absolute_url())
|
||||
|
||||
iprs, docs = iprs_from_docs(docs)
|
||||
if iprs:
|
||||
ipr_links = [ urlreverse("ietf.ipr.views.show", kwargs=dict(ipr_id=i.ipr_id)) for i in iprs]
|
||||
ipr_links = [ settings.IDTRACKER_BASE_URL+url if not url.startswith("http") else url for url in ipr_links ]
|
||||
else:
|
||||
ipr_links = None
|
||||
|
||||
return render_to_string("idrfc/last_call_announcement.txt",
|
||||
dict(doc=doc,
|
||||
doc_url=settings.IDTRACKER_BASE_URL + doc.idinternal.get_absolute_url(),
|
||||
|
@ -84,6 +93,7 @@ def generate_last_call_announcement(request, doc):
|
|||
urls=urls,
|
||||
status=status,
|
||||
impl_report="Draft" in status or "Full" in status,
|
||||
ipr_links=ipr_links,
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ from ietf.idtracker.templatetags.ietf_filters import in_group
|
|||
from ietf.idtracker.models import *
|
||||
from ietf.iesg.models import *
|
||||
from ietf.ipr.models import IprDetail
|
||||
from ietf.ipr.search import iprs_from_docs
|
||||
from ietf.idrfc.mails import *
|
||||
from ietf.idrfc.utils import *
|
||||
from ietf.idrfc.lastcall import request_last_call
|
||||
|
@ -631,24 +632,6 @@ def make_last_call(request, name):
|
|||
|
||||
announcement = ballot.last_call_text
|
||||
|
||||
# why cut -4 off filename? a better question is probably why these
|
||||
# tables aren't linked together properly
|
||||
filename_fragment = doc.filename[:-4]
|
||||
iprs = IprDetail.objects.filter(title__icontains=filename_fragment)
|
||||
if iprs:
|
||||
links = [ urlreverse("ietf.ipr.views.show", kwargs=dict(ipr_id=i.ipr_id))
|
||||
for i in iprs]
|
||||
|
||||
links = [ settings.IDTRACKER_BASE_URL+url if not url.startswith("http") else url for url in links ]
|
||||
|
||||
announcement += "\n\n"
|
||||
announcement += "The following IPR Declarations may be related to this I-D:"
|
||||
announcement += "\n\n"
|
||||
announcement += "\n".join(links)
|
||||
else:
|
||||
announcement += "\n\n"
|
||||
announcement += "No IPR declarations have been submitted directly on this I-D."
|
||||
|
||||
if request.method == 'POST':
|
||||
form = MakeLastCallForm(request.POST)
|
||||
if form.is_valid():
|
||||
|
|
|
@ -19,4 +19,13 @@ http://www.ietf.org/iesg/implementation.html
|
|||
{% endif %}
|
||||
IESG discussion can be tracked via
|
||||
{{ doc_url }}
|
||||
|
||||
{% if ipr_links %}
|
||||
The following IPR Declarations may be related to this I-D:
|
||||
|
||||
{% for link in ipr_links %} {{ link }}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
No IPR declarations have been submitted directly on this I-D.
|
||||
{% endif %}
|
||||
{% endautoescape %}
|
||||
|
|
Loading…
Reference in a new issue