Repository: ietf-tools/datatracker

Issue:
Requested directorate reviews are not shown on the document status page until (?)
### Describe the issue

When as a chair I request directorate reviews for a draft, initially no indication that any review is requested is shown on the draft's status page until... I guess until the corresponding request is processed by the directorate's secretary and is assigned? Or something else? Anyway, later I can see that reviews are requested and see which of them are completed. 
The problem is that until that point there is no indication on document's status page that reviews are requested, apart from the document's history, which is a bit inconvenient. The fellow co-chair might accidently request the same reviews again when they are in fact already requested...
It would be good if the information that a review is requested (but probably not yet assigned) appears on the document's status page right after the request is done.

### 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:

Resolving patch:
diff --git a/ietf/doc/views_doc.py b/ietf/doc/views_doc.py
--- a/ietf/doc/views_doc.py
+++ b/ietf/doc/views_doc.py
@@ -79,7 +79,7 @@
 from ietf.meeting.models import Session
 from ietf.meeting.utils import group_sessions, get_upcoming_manageable_sessions, sort_sessions, add_event_info_to_session_qs
 from ietf.review.models import ReviewAssignment
-from ietf.review.utils import can_request_review_of_doc, review_assignments_to_list_for_docs
+from ietf.review.utils import can_request_review_of_doc, review_assignments_to_list_for_docs, review_requests_to_list_for_docs
 from ietf.review.utils import no_review_from_teams_on_doc
 from ietf.utils import markup_txt, log, markdown
 from ietf.utils.draft import PlaintextDraft
@@ -498,6 +498,7 @@ def document_main(request, name, rev=None, document_html=False):
         started_iesg_process = doc.latest_event(type="started_iesg_process")
 
         review_assignments = review_assignments_to_list_for_docs([doc]).get(doc.name, [])
+        review_requests = review_requests_to_list_for_docs([doc]).get(doc.name, [])
         no_review_from_teams = no_review_from_teams_on_doc(doc, rev or doc.rev)
 
         exp_comment = doc.latest_event(IanaExpertDocEvent,type="comment")
@@ -613,6 +614,7 @@ def document_main(request, name, rev=None, document_html=False):
                                        actions=actions,
                                        presentations=presentations,
                                        review_assignments=review_assignments,
+                                       review_requests=review_requests,
                                        no_review_from_teams=no_review_from_teams,
                                        due_date=due_date,
                                        diff_revisions=diff_revisions
diff --git a/ietf/review/utils.py b/ietf/review/utils.py
--- a/ietf/review/utils.py
+++ b/ietf/review/utils.py
@@ -79,6 +79,11 @@ def review_assignments_to_list_for_docs(docs):
 
     return extract_revision_ordered_review_assignments_for_documents_and_replaced(assignment_qs, doc_names)
 
+def review_requests_to_list_for_docs(docs):
+    review_requests_qs = ReviewRequest.objects.filter(Q(state_id='requested'))
+    doc_names = [d.name for d in docs]
+    return extract_revision_ordered_review_requests_for_documents_and_replaced(review_requests_qs, doc_names)
+
 def augment_review_requests_with_events(review_reqs):
     req_dict = { r.pk: r for r in review_reqs }
     for e in ReviewRequestDocEvent.objects.filter(review_request__in=review_reqs, type__in=["assigned_review_request", "closed_review_request"]).order_by("time"):


Test patch: