Skip to content
9 changes: 8 additions & 1 deletion ietf/doc/utils_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ def fill_in_document_table_attributes(docs, have_telechat_date=False):
d.search_heading = "Withdrawn Internet-Draft"
d.expirable = False
else:
d.search_heading = "%s Internet-Draft" % d.get_state()
if d.type_id == "draft" and d.stream_id == 'ietf' and d.get_state_slug('draft-iesg') != 'idexists': # values can be: ad-eval idexists approved rfcqueue dead iesg-eva
d.search_heading = "%s with the IESG Internet-Draft" % d.get_state()
else:
d.search_heading = "%s Internet-Draft" % d.get_state()
if state_slug == "active":
d.expirable = d.pk in expirable_pks
else:
Expand Down Expand Up @@ -221,6 +224,10 @@ def num(i):

if d.type_id == "draft":
res.append(num(["Active", "Expired", "Replaced", "Withdrawn", "RFC"].index(d.search_heading.split()[0])))
if "with the IESG" in d.search_heading:
res.append("1")
else:
res.append("0")
else:
res.append(d.type_id);
res.append("-");
Expand Down
22 changes: 21 additions & 1 deletion ietf/group/tests_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

from ietf.community.models import CommunityList
from ietf.community.utils import reset_name_contains_index_for_rule
from ietf.doc.factories import WgDraftFactory, IndividualDraftFactory, CharterFactory, BallotDocEventFactory
from ietf.doc.factories import WgDraftFactory, RgDraftFactory, IndividualDraftFactory, CharterFactory, BallotDocEventFactory
from ietf.doc.models import Document, DocEvent, State
from ietf.doc.storage_utils import retrieve_str
from ietf.doc.utils_charter import charter_name_for_group
Expand Down Expand Up @@ -413,6 +413,7 @@ def test_group_documents(self):
self.assertContains(r, draft3.name)
for ah in draft3.action_holders.all():
self.assertContains(r, escape(ah.name))
self.assertContains(r, "Active with the IESG Internet-Draft") # draft3 is pub-req hence should have such a divider
self.assertContains(r, 'for 173 days', count=1) # the old_dah should be tagged
self.assertContains(r, draft4.name)
self.assertNotContains(r, draft5.name)
Expand All @@ -425,6 +426,25 @@ def test_group_documents(self):
q = PyQuery(r.content)
self.assertTrue(any([draft2.name in x.attrib['href'] for x in q('table td a.track-untrack-doc')]))

# Let's also check the IRTF stream
rg = GroupFactory(type_id='rg')
setup_default_community_list_for_group(rg)
rgDraft = RgDraftFactory(group=rg)
rgDraft4 = RgDraftFactory(group=rg)
rgDraft4.set_state(State.objects.get(slug='irsg-w'))
rgDraft7 = RgDraftFactory(group=rg)
rgDraft7.set_state(State.objects.get(type='draft-stream-%s' % rgDraft7.stream_id, slug='dead'))
for url in group_urlreverse_list(rg, 'ietf.group.views.group_documents'):
with self.settings(DOC_ACTION_HOLDER_MAX_AGE_DAYS=20):
r = self.client.get(url)
self.assertEqual(r.status_code, 200)
self.assertContains(r, rgDraft.name)
self.assertContains(r, rg.name)
self.assertContains(r, rg.acronym)
self.assertNotContains(r, draft3.name) # As draft3 is a WG draft, it should not be listed here
self.assertContains(r, rgDraft4.name)
self.assertNotContains(r, rgDraft7.name)

# test the txt version too while we're at it
for url in group_urlreverse_list(group, 'ietf.group.views.group_documents_txt'):
r = self.client.get(url)
Expand Down
1 change: 0 additions & 1 deletion ietf/group/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ def prepare_group_documents(request, group, clist):

return docs, meta, docs_related, meta_related


def get_leadership(group_type):
people = Person.objects.filter(
role__name__slug="chair",
Expand Down
Loading