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: Show recordings for interims#7197

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

richsalz
Copy link
Collaborator

List the recordings if the "meeting numnber" starts with "interim"

Fixes: #6543

List the recordings if the "meeting numnber" starts with "interim"

Fixes: ietf-tools#6543
@richsalz
Copy link
Collaborator Author

@@ -320,7 +320,7 @@ <h3 class="mt-4">Notes and recordings</h3>
</tr>
{% endif %}
{# Recordings #}
{% if meeting.number|add:"0" >= 80 %}
{% if meeting.number|add:"0" >= 80 or "interim" in meeting.number %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% if meeting.number|add:"0" >= 80 or "interim" in meeting.number %}
{% if meeting.type_id == 'ietf' and meeting.number|add:"0" >= 80 or meeting.type_id != 'ietf' %}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above suggestion is a bit awkward - it requires knowing the precedence of operators as documented at https://docs.djangoproject.com/en/5.0/ref/templates/builtins/#boolean-operators. It might be better to move this into the view code to get away from the |add:"0" type-coersion-by-hack-trick anyhow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought of something like that. In addition to the one mentioned above, the other tests against meeting 60. What's the significance of meetings 60 and 80? I'd like to remove the magic numbers, replacing with a reasonable function name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they aren't magic (though they aren't complete) - they are places where the shape of proceedings and what was captured at meetings fundamentally changes. 60 was when we first started capturing chatlogs (jabber at the time). 80 was a point at where recording tech changed significantly.

That said, we don't have any Documents of type "recording" before ietf-100, so the code being touched here could could (for meetings of type ietf) not show the recordings block at all for meeting numbers < 100.

Improve the test to be more general.

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
Copy link

codecov bot commented Mar 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.93%. Comparing base (187c2c5) to head (f414ae4).
Report is 79 commits behind head on main.

❗ Current head f414ae4 differs from pull request most recent head a4c3198. Consider uploading reports for the commit a4c3198 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7197      +/-   ##
==========================================
- Coverage   88.98%   88.93%   -0.05%     
==========================================
  Files         291      291              
  Lines       40717    41063     +346     
==========================================
+ Hits        36233    36521     +288     
- Misses       4484     4542      +58     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rjsparks
Copy link
Member

Should the same fix be made for the buttons, at https://github.com/ietf-tools/datatracker/blob/main/ietf/templates/meeting/session_buttons_include.html#L139 ?

Looks like it.

This really needs a new (or updated) test.

Put same "records available?" test in the buttons that we did
in the interim meeting status page.

Fixes: ietf-tools#6543
Add filters to meeting to test if we have recordings and have_notes,
rather than inline examination of the meeting instance and tests.
Remove the use_notes parameter from the various templates.
Instead, add a new meeting filter, has_notes, and use that
in the templates.
Copy link
Member

@rjsparks rjsparks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is shaping up nicely. It should go a litter further as noted inline.

@@ -881,3 +881,19 @@ def badgeify(blob):
)

return text

@register.filter
def has_chat_logs(meeting):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this get the same "Return true for interims" treatment?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear that these should be filters - why aren't they methods on Meeting instead? (those would be visible to the templates). I think you were on the way to discovering that with the partial removal of the has_notes filter, and the redundant argument passed to the templates in the views later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to make them methods on the meeting if you prefer. I didn't know templates could invoke methods directly :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this get the same "Return true for interims" treatment?

I guess? I changed it in the commit 466a630

Comment on lines 897 to 899
#register.filter
#define has_notes(meeting):
return meeting.uses_notes()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks incomplete - if the intent was to remove the filter L899 should also go.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and I suspect all of these should just be removed once the functionality is moved to Meeting.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this was just checking in a snapshot before i got on the plane. will move to templates and fix shortly.

Also fix has_notes() to be consistent with has_recordings()
This is for consistency with the meeting uses_notes method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Youtube link is not shown in Notes and Recordings section of past meeting materials
2 participants