Repository: ietf-tools/datatracker

Issue:
Links to meetecho aren't appearing for some sessions of the ietf group
(Probably related to session purpose).
At IETF 115, links for meetecho did not automatically appear for the Newcomers session, IEPG, the wgchairs forum, or the host speaker series.

The secretariat entered alternate online coordinates, which shouldn't have been necessary - it resulted in three buttons suddenly appearing - the manually entered coordinates and the automatically generated coordinates that were not present before. In one case (host speaker series), because things were done at meeting speed, those links were _different_.

wgchairs might be different from the others as it was (I think) created as group emodir (which is right), but the links saying emodir rather than wgchairs caused some consternation.


Discussion:
The decision whether to show the buttons at all is here

https://github.com/ietf-tools/datatracker/blob/61f7984d5c3b98de4d57113c14255eaef9180b7f/client/agenda/AgendaScheduleList.vue#L273

The `showAgenda` flag comes from

https://github.com/ietf-tools/datatracker/blob/61f7984d5c3b98de4d57113c14255eaef9180b7f/ietf/meeting/views.py#L1720-L1723

which is why setting the `remote_instructions` value causes buttons to appear.

The standard buttons come from the `Room` where the session is being held. The meetecho links are generated using the `UrlResource` with `name=='meetecho'`, which (for all rooms) is `https://meetings.conf.meetecho.com/ietf{meeting.number}/?group={group.acronym}&short={short}&item={order_number}` with the bracketed expressions interpolated.
Question: what exactly tneeds to change here? The simplest thing to do would be to turn on the standard meetecho links for these sessions. Assuming the `Room` data are similar to IETF-115 in the future, that will add video stream, audio stream, and onsite tool links. These will be formatted like 
* Host Speaker Series
    * `https://meetings.conf.meetecho.com/ietf115/?group=ietf&short=&item=3`
* New participants' overview
    * `https://meetings.conf.meetecho.com/ietf115/?group=emodir&short=&item=2`
* IEPG
    * `https://meetings.conf.meetecho.com/ietf115/?group=iepg&short=&item=1`
* WG Chairs Forum
    * `https://meetings.conf.meetecho.com/ietf115/?group=emodir&short=&item=4
These are the values for the "video stream" but the other URLs will be similar. I've made up the item numbers, but the groups are accurate.

Are these ok? It doesn't address the consternation about the wgchairs URL containing emodir, but that could be at least partly addressed by giving the session a short name (which would show up in the URL where there's currently a blank value for the `short` query parameter).
standard meetecho links is what I think is what we are asking for.

Resolving patch:
diff --git a/ietf/meeting/views.py b/ietf/meeting/views.py
--- a/ietf/meeting/views.py
+++ b/ietf/meeting/views.py
@@ -1708,6 +1708,7 @@ def agenda_extract_schedule (item):
         "startDateTime": item.timeslot.time.isoformat(),
         "status": item.session.current_status,
         "type": item.session.type.slug,
+        "purpose": item.session.purpose.slug,
         "isBoF": item.session.group_at_the_time().state_id == "bof",
         "filterKeywords": item.filter_keywords,
         "groupAcronym": item.session.group_at_the_time().acronym,


Test patch:
diff --git a/playwright/tests/meeting/agenda.spec.js b/playwright/tests/meeting/agenda.spec.js
--- a/playwright/tests/meeting/agenda.spec.js
+++ b/playwright/tests/meeting/agenda.spec.js
@@ -268,7 +268,7 @@ test.describe('past - desktop', () => {
         }
         // Scheduled
         case 'sched': {
-          if (event.flags.showAgenda || ['regular', 'plenary'].includes(event.type)) {
+          if (event.flags.showAgenda || (['regular', 'plenary', 'other'].includes(event.type) && !['admin', 'closed_meeting', 'officehours', 'social'].includes(event.purpose))) {
             const eventButtons = row.locator('.agenda-table-cell-links > .agenda-table-cell-links-buttons')
             if (event.flags.agenda) {
               // Show meeting materials button
@@ -1145,7 +1145,7 @@ test.describe('future - desktop', () => {
       // -----------------------
       if (event.status === 'sched') {
         const eventButtons = row.locator('.agenda-table-cell-links > .agenda-table-cell-links-buttons')
-        if (event.flags.showAgenda || ['regular', 'plenary'].includes(event.type)) {
+        if (event.flags.showAgenda || (['regular', 'plenary', 'other'].includes(event.type) && !['admin', 'closed_meeting', 'officehours', 'social'].includes(event.purpose))) {
           if (event.flags.agenda) {
             // Show meeting materials button
             await expect(eventButtons.locator('i.bi.bi-collection')).toBeVisible()