* Brought search results against WGs and document titles into consistency with results from searching for individual documents * Added the IPR count to the link on the documents main page (when not zero) * Built on Henrik's reimplementation of all_related_*, making the *_related_* functions return DocAlias lists consistently, and added corresponding _relations_ functions to get lists of actual RelatedDocument objects. * Added getting the DocAlias with the same name to Document * Added getting related IPR disclosures (as described in the first bullet) to Document * Simplified ipr/related.py * Removed the use of DraftLikeDocAlias and IETFWG from ipr/search.py. Retooled the various search functions and templates to use DocAlias and IprDocAlias directly. * Removed dead code from ipr/search.py * Removed the special handling of WG 2000 from ipr/search.py Fixes bug 1071 - Legacy-Id: 6042
16 lines
475 B
Python
16 lines
475 B
Python
# Copyright The IETF Trust 2007, All Rights Reserved
|
|
|
|
def related_docs(alias):
|
|
results = list(alias.document.docalias_set.all())
|
|
|
|
rels = alias.document.all_relations_that_doc(['replaces','obs'])
|
|
|
|
for rel in rels:
|
|
rel_aliases = list(rel.target.document.docalias_set.all())
|
|
|
|
for x in rel_aliases:
|
|
x.related = rel
|
|
x.relation = rel.relationship.revname
|
|
results += rel_aliases
|
|
return list(set(results))
|