Repository: ietf-tools/datatracker

Issue:
Remove liaision attachment as a type of document you can search for from the main menu.
### Describe the issue

I searched for "3GPP" in the datatracker, and picked "liaison attachments" as my document type. 

I found the liaison attachments in the results I expected to see (123 hits, including a lot from the IMS era in the early 2000s), including the ones I am interested in. 

[liaison-2020-09-24-3gpp-tsgsa-sa2-quic-ls-on-atsss-phase-2-requirements-to-ietf-quic-working-group-attachment-1-](https://datatracker.ietf.org/doc/liaison-2020-09-24-3gpp-tsgsa-sa2-quic-ls-on-atsss-phase-2-requirements-to-ietf-quic-working-group-attachment-1/)
S2-2006331 was 5185 eATSSS LS to IETFr07

[liaison-2020-11-30-3gpp-tsgsa-sa2-quic-ls-on-atsss-phase-2-conclusions-attachment-1-](https://datatracker.ietf.org/doc/liaison-2020-11-30-3gpp-tsgsa-sa2-quic-ls-on-atsss-phase-2-conclusions-attachment-1/)
S2-2009400_8852r02

For both of these (and for several other liaison attachments), I got 

> The page you were looking for couldn't be found
> The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

Do you folks have thoughts? 

### Code of Conduct

- [X] I agree to follow the [IETF's Code of Conduct](https://github.com/ietf-tools/.github/blob/main/CODE_OF_CONDUCT.md)


Discussion:
Where are you finding the broken attachment links?
For the first one, I'm looking at 
https://datatracker.ietf.org/liaison/1697/
where the attachment link is to
https://www.ietf.org/lib/dt/documents/LIAISON/liaison-2020-09-24-3gpp-tsgsa-sa2-quic-ls-on-atsss-phase-2-requirements-to-ietf-quic-working-group-attachment-1.docx
which does not 404.

ok - I can reproduce.

It may be that providing the liaison attachment doc type on the main search page is an attractive nuisance, as you would get much more informative search results using the search form at the top of 
https://datatracker.ietf.org/liaison/

But as long as the search result rows are made available this way, the links need to be to the correct thing.
(Nothing's _missing_ - the links are just not being built correctly).

Yep - there is no handler at /doc/ for liaison attachments - the code falls through to here:
https://github.com/ietf-tools/datatracker/blob/8.15.0/ietf/doc/views_doc.py#L727

Creating a meaningful view would be pretty hard - if we leave this as a kind of link, the best thing I can think to do is to redirect to the liaison statement view for the statement containing the attachment.

But I'm still leaning pretty strongly towards removing the category from the main search page in favor of the search at /liaison

Hi, Robert,

On Fri, Aug 26, 2022 at 4:11 PM Robert Sparks ***@***.***>
wrote:

> Yep - there is no handler at /doc/ for liaison attachments - the code
> falls through to here:
>
> https://github.com/ietf-tools/datatracker/blob/8.15.0/ietf/doc/views_doc.py#L727
>
> Creating a meaningful view would be pretty hard - if we leave this as a
> kind of link, the best thing I can think to do is to redirect to the
> liaison statement view for the statement containing the attachment.
>
> But I'm still leaning pretty strongly towards removing the category from
> the main search page in favor of the search at /liaison
>

So, I may very well have been confused, because I didn't send or receive
THAT many liaison statements while ether on the IAB or IESG, but I thought
there was a pointer to the liaison statements on the same page that other
IESGish things (either https://www.ietf.org/about/groups/iesg/ or its
predecessor page before the new webpage views were deployed),

There are likely other places I could have looked, but I use the
datatracker to look up expired internet drafts or documents with specific
authors often enough that I click on the document types view about once a
week, so I had noticed that liaison attachments were one of the document
types, and went there, with the results I reported.

I now see that the IAB home page has a Liaisons tab, which COULD have
pulldowns for many of the links that are included on
https://www.iab.org/liaisons/, but it doesn't (the only pulldowns are for
IAB-IEEE 802 Coordination and IETF Liaison Manager Reports), but the link I
was looking for was hiding in plain sight if I'd clicked on the Liaisons
tab.

So, circling back around - I agree with your inclination to just remove the
category - I had a pretty good idea of what I was looking for, but while I
was figuring out what to search for, I noticed that it's not hard to
construct a query that retrieves more than 200 document pointers, and the
liaison attachments are returned oldest-first, and I don't know how to
search for the 200 most recent, so I would have been stuck. I have
confidence that you can make the query work in the datatracker, but life is
too short, especially if I can annoy Greg (IETF) and Cindy (IAB still,
right?), and get visible pointers on webpages they maintain.

Enjoy your weekend, and if you're not having fun, just remember the work I
helped talk you out of doing, and SMILE. 😉

Best,

Spencer

This menu item might be what you are looking for?
![image](https://user-images.githubusercontent.com/10996692/187314487-2c61b156-2b2c-4aa4-a987-30bae60f48d1.png)


Hi, @rjsparks, this is a YUUGE improvement over what I was looking at, when searching for liaison statements, and it's a nook/cranny in the datratracker that I hadn't tripped over previously. Thank you for the pointer. 

I have a number of questions about the liaison statements returned here, and they are probably obscure. For instance - does "Posted" include "Action Needed", "Pending", and "Dead"? But I'd rather find one person who is responsible for liaison statements to ask, than just keep firing off questions to the tools team/datatracker migration team and annoying all of you. 

Is there a right person for me to annoy?
You should probably find who in the IAB is currently overseeing liaison activity (the IAB has restructured how they handle that recently). But I suspect you'll still end up needing help from the tools-team with datatracker details.
But to start to answer in case you need early insight:

The states a statement can be in are ['pending', 'approved', 'posted', 'dead']. 
Most of these are only used with outgoing statements (starting in pending, getting reviewed, then approved, then posted. Or if review says not to pursue, moving it from pending to dead). Posted is when it becomes available at /liaisons/ for anyone to see. Incoming statements go into a triage queue (reusing pending IIRC) and move from pending to posted very quickly.

"Action needed" is modeled separately and is only something used with posted Liaison statements.

Resolving patch:
diff --git a/ietf/doc/views_search.py b/ietf/doc/views_search.py
--- a/ietf/doc/views_search.py
+++ b/ietf/doc/views_search.py
@@ -94,7 +94,7 @@ class SearchForm(forms.Form):
             ("ad", "AD"), ("-ad", "AD (desc)"), ),
         required=False, widget=forms.HiddenInput)
 
-    doctypes = forms.ModelMultipleChoiceField(queryset=DocTypeName.objects.filter(used=True).exclude(slug='draft').order_by('name'), required=False)
+    doctypes = forms.ModelMultipleChoiceField(queryset=DocTypeName.objects.filter(used=True).exclude(slug__in=('draft','liai-att')).order_by('name'), required=False)
 
     def __init__(self, *args, **kwargs):
         super(SearchForm, self).__init__(*args, **kwargs)
@@ -479,7 +479,7 @@ def ad_workload(request):
 
     doctypes = list(
         DocTypeName.objects.filter(used=True)
-        .exclude(slug="draft")
+        .exclude(slug__in=("draft", "liai-att"))
         .values_list("pk", flat=True)
     )
 
@@ -675,7 +675,7 @@ def docs_for_ad(request, name):
     form = SearchForm({'by':'ad','ad': ad.id,
                        'rfcs':'on', 'activedrafts':'on', 'olddrafts':'on',
                        'sort': 'status',
-                       'doctypes': list(DocTypeName.objects.filter(used=True).exclude(slug='draft').values_list("pk", flat=True))})
+                       'doctypes': list(DocTypeName.objects.filter(used=True).exclude(slug__in=('draft','liai-att')).values_list("pk", flat=True))})
     results, meta = prepare_document_table(request, retrieve_search_results(form), form.data, max_results=500)
     results.sort(key=ad_dashboard_sort_key)
     del meta["headers"][-1]


Test patch: