Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include IRTF and BoF groups on meeting requests page #4528

Merged
merged 4 commits into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions ietf/meeting/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6458,7 +6458,7 @@ def test_meeting_requests(self):
group_type_without_meetings = 'editorial'
self.assertFalse(GroupFeatures.objects.get(pk=group_type_without_meetings).has_meetings)

area = GroupFactory(type_id='area')
area = GroupFactory(type_id='area', acronym='area')
requested_session = SessionFactory(meeting=meeting,group__parent=area,status_id='schedw',add_to_schedule=False)
conflicting_session = SessionFactory(meeting=meeting,group__parent=area,status_id='schedw',add_to_schedule=False)
ConstraintFactory(name_id='key_participant',meeting=meeting,source=requested_session.group,target=conflicting_session.group)
Expand Down Expand Up @@ -6498,7 +6498,21 @@ def test_meeting_requests(self):
status_id='schedw',
add_to_schedule=False,
)

# bof sessions should be shown
bof_session = SessionFactory(
meeting=meeting,
group__parent=area,
group__state_id='bof',
status_id='schedw',
add_to_schedule=False,
)
# rg sessions should be shown under 'irtf' heading
rg_session = SessionFactory(
meeting=meeting,
group__type_id='rg',
status_id='schedw',
add_to_schedule=False,
)
def _sreq_edit_link(sess):
return urlreverse(
'ietf.secr.sreq.views.edit',
Expand Down Expand Up @@ -6531,6 +6545,17 @@ def _sreq_edit_link(sess):
self.assertContains(r, _sreq_edit_link(has_meetings_not_meeting)) # link to the session request
self.assertNotContains(r, not_has_meetings.group.acronym)
self.assertNotContains(r, _sreq_edit_link(not_has_meetings)) # no link to the session request
self.assertContains(r, bof_session.group.acronym)
self.assertContains(r, _sreq_edit_link(bof_session)) # link to the session request
self.assertContains(r, rg_session.group.acronym)
self.assertContains(r, _sreq_edit_link(rg_session)) # link to the session request
# check headings - note that the special types (has_meetings, etc) do not have a group parent
# so they show up in 'other'
q = PyQuery(r.content)
self.assertEqual(len(q('h2#area')), 1)
self.assertEqual(len(q('h2#other-groups')), 1)
self.assertEqual(len(q('h2#irtf')), 1) # rg group has irtf group as parent


def test_request_minutes(self):
meeting = MeetingFactory(type_id='ietf')
Expand Down
7 changes: 5 additions & 2 deletions ietf/meeting/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2320,7 +2320,10 @@ def agenda_json(request, num=None):

def meeting_requests(request, num=None):
meeting = get_meeting(num)
groups_to_show = Group.objects.filter(state_id='active', type__features__has_meetings=True)
groups_to_show = Group.objects.filter(
state_id__in=('active', 'bof'),
type__features__has_meetings=True,
)
sessions = list(
Session.objects.requests().filter(
meeting__number=meeting.number,
Expand All @@ -2340,7 +2343,7 @@ def meeting_requests(request, num=None):
for s in sessions:
s.current_status_name = status_names.get(s.current_status, s.current_status)
s.requested_by_person = session_requesters.get(s.requested_by)
if s.group.parent and s.group.parent.type.slug == 'area':
if s.group.parent and s.group.parent.type.slug in ('area', 'irtf'):
s.display_area = s.group.parent
else:
s.display_area = None
Expand Down
3 changes: 3 additions & 0 deletions ietf/templates/meeting/requests.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ <h2 class="mt-5" id="{% firstof area.grouper.acronym "other-groups" %}">
<i class="bi bi-people-fill"></i> {{ session.attendees }}
</div>
{% endif %}
{% if session.group.is_bof %}
<span class="badge bg-success float-end">BOF</span>
{% endif %}
</td>
<td class="d-none d-lg-table-cell">
{% if session.requested_duration %}{{ session.requested_duration|stringformat:"s"|slice:"0:4" }}{% endif %}
Expand Down