Commit graph

289 commits

Author SHA1 Message Date
Jennifer Richards 32054111df
fix: fix failing tests and eliminate naive datetime warnings (#4402)
* test: fix timestamp construction in several doc tests

* refactor: rename date2datetime to datetime_from_date and clarify code

* chore: helper to get tzinfo for PRODUCTION_TIMEZONE

* fix: fix timezone handling in make_last_call()

* test: fix datetime generation in doc.tests_charter

* refactor: remove PRODUCTION_TIMEZONE setting

Replaces the PRODUCTION_TIMEZONE setting with a constant,
DEADLINE_TZINFO, in ietf.utils.timezone.

* test: be more careful about timezone in tests_charter.py

* test: be more careful about timezone in doc/tests.py

* fix: fix timezone handling affecting doc.tests_draft

* fix: fix timezone handling affecting tests_irsg_ballot.py

* fix: fix timezone handling affecting tests_review.py

* fix: fix timezone handling affecting last ietf.doc tests

* fix: fix timezone handling affecting last ietf.group tests

* fix: fix timezone handling affecting ietf.iesg tests

* fix: handle timezones in get_8989_eligibility_querysets

* fix: handle timezones affecting ietfauth tests

* fix: return tz-aware datetime from utc_from_string

* fix: specify timezone for constants in ipr_rfc_number()

* fix: specify tz for ipr deadlines

* fix: handle timezones affecting liaisons tests

* fix: treat leap day in get_8989_eligibility_querysets()

Manual cherry-pick of 248d6474

* test: treat leap day properly in nomcom tests

* fix: fix timezone handling affecting nomcom tests

* test: fix timezone handling in review tests

* fix: fix timezone handling affecting secr.meetings tests

* fix: handle both pytz and zoneinfo timezones in ietf.utils.timezone

* fix: fix timezone handling affecting secr.proceedings tests

* refactor: use make_aware() helper in secr.meetings tests

* test: fix timezone handling in secr.telechat tests

* fix: fix timezone handling affecting stats tests

* fix: eliminate tz-naive helpers affecting sync email parsing

* fix: include timezone data when serializing DeletedEvent data

* fix: fix timezone handling affecting sync tests

* style: remove unused import
2022-09-01 13:07:28 -03:00
Jennifer Richards 8b52d27b02
refactor: refactor timestamp handling so tests in meeting app pass (#4371)
* refactor: replace datetime.now with timezone.now

* refactor: migrate model fields to use timezone.now as default

* refactor: replace datetime.today with timezone.now

datetime.datetime.today() is equivalent to datetime.datetime.now(); both
return a naive datetime with the current local time.

* refactor: rephrase datetime.now(tz) as timezone.now().astimezone(tz)

This is effectively the same, but is less likely to encourage accidental
use of naive datetimes.

* refactor: revert datetime.today() change to old migrations

* refactor: change a missed datetime.now to timezone.now

* chore: renumber timezone_now migration

* chore: add migration to change timestamps to UTC

* refactor: move tz instantiation/caching from TimeSlot to Meeting

* fix: assume utc if meeting.time_zone is blank

* chore: make datetime.combine() calls tz aware in the meeting app

* ci: correctly use meeting.tz in TimeSlotFactory

* chore: compute TimeSlot utc / local times assuming tz-aware times

* chore: use tzaware math for agenda editor timeslot layout

* chore: fill in Meeting.time_zone where it is blank

Nearly all interim meetings on or before 2016-07-01 have blank
time_zone values. This migration fills these in with PST8PDT.

* chore: disallow blank Meeting.time_zone value

* refactor: no need to handle blank time_zone case in TZ migration

* refactor: remove now-unnecessary checks that meeting has time_zone

* chore: fix timezone handling in agenda.ics and Meeting.updated()

* chore: fix tz handling in interim_request_details, exercise in tests

* chore: fix timezone handling for test_interim_send_announcement

* chore: fix timezone handling in agenda_json()

* chore: fix timezone handling in old agenda

* chore: fix timezone handling for EditTimeslotsTests

* refactor: refactor a few fixes for more consistent timezone handling

* chore: add timezone info to timestamps in fixtures

* chore: remove naive datetime warnings found in meetings.tests_views

* chore: fix a few more test failures in meetings.tests_views

All tests in meetings.tests_views now passing

* chore: remove unused import

* chore: fix timezone handling in test_schedule_generator.py

* chore: fix timezone handling affecting meeting.tests_js

* chore: fix timeslot test bug when local date != UTC date

* test: fix a few failing tests, all meetings tests now pass

(for me, anyway)

* chore: renumber migrations

* chore: update timestamp conversion migration

The django-celery-beat package introduces tables with timestamp
columns. These columns are stored in CELERY_TIMEZONE. Because we run with
this set to UTC, the migration ignores these columns.

* chore: fix pytz-related change in migration

* chore: remove duplicate migrations

* chore: remove CELERY_BEAT_TZ_AWARE setting now that USE_TZ is True

* test: avoid failure in test with bogus timezone
2022-08-26 16:53:19 -03:00
Jennifer Richards 42203d7a9c
chore: migrate timestamps for use with USE_TZ=True (#4370)
* chore: add migration to change timestamps to UTC

* chore: fill in Meeting.time_zone where it is blank

Nearly all interim meetings on or before 2016-07-01 have blank
time_zone values. This migration fills these in with PST8PDT.

* chore: disallow blank Meeting.time_zone value

* refactor: no need to handle blank time_zone case in TZ migration

* refactor: remove now-unnecessary checks that meeting has time_zone

* chore: renumber migrations

* chore: update timestamp conversion migration

The django-celery-beat package introduces tables with timestamp
columns. These columns are stored in CELERY_TIMEZONE. Because we run with
this set to UTC, the migration ignores these columns.

* chore: fix pytz-related change in migration

* chore: be explicit that Meeting.vtimezone can return None

* refactor: remove unnecessary save()
2022-08-26 13:03:19 -03:00
Jennifer Richards ebebdbed3e
refactor: replace datetime.now and datetime.today with timezone.now (#4211)
* refactor: replace datetime.now with timezone.now

* refactor: migrate model fields to use timezone.now as default

* refactor: replace datetime.today with timezone.now

datetime.datetime.today() is equivalent to datetime.datetime.now(); both
return a naive datetime with the current local time.

* refactor: rephrase datetime.now(tz) as timezone.now().astimezone(tz)

This is effectively the same, but is less likely to encourage accidental
use of naive datetimes.

* refactor: revert datetime.today() change to old migrations

* refactor: change a missed datetime.now to timezone.now

* chore: renumber timezone_now migration

* chore: renumber migrations
2022-08-25 13:45:16 -03:00
Robert Sparks 9c236ea2a2
chore: remove unneeded logging and code marked unreachable that has not been reached. (#4305)
* chore: remove unneeded logging and code marked unreachable that has not been reached.

* fix: remove noop save override
2022-08-04 11:25:31 -05:00
Jennifer Richards b4e5cfcf91
fix: link to jabber logs for old meetings (#4250)
* fix: link to jabber logs for old meetings

* test: validate the URL for old Session chat logs
2022-07-24 09:06:23 -05:00
Robert Sparks 6ed4ea0f93
feat: point to Zulip chat rather than jabber. (#4218)
* feat: point to Zulip chat rather than jabber.

* fix: Address review comments from Jennifer and Nick
2022-07-15 13:48:54 -05:00
Robert Sparks 10396d6f01
chore: remove more tools.ietf.org server only related things. (#4103)
* chore: remove more tools.ietf.org server only related things.

* chore: remove use of tools.ietf.org floorplans\n\nThe data will move into the FloorPlan models instead.
2022-06-22 14:11:46 -05:00
Robert Sparks 07bfa68a75
feat: explicitly model session attendance (#4025)
* feat: add model to track session attendance

* feat: add model to track session attendance

* feat: add api to set session attendees

* fix: use user pk instead off person pk in the attended api.

* feat: calculate three of five from attended

* feat: management utility to populate Attended model history

* docs: document why nomcom calculations don't use Attended yet.

* fix: add migration to add new personalapikey endpoint to choices

* test: verify very old last login prevents api key use,

* chore: address review nits

* chore: comment on some idiosyncracies of the expected input to populate_attended

* fix: add unique_together constraint for the Attended model

* fix: correctly handle empty querysets passed to three_of_five_eligible functions.
2022-06-20 10:46:36 -05:00
Jennifer Richards cb996c5c0b
fix: refactor/correct calculation of week-view event start/end times (#3947)
* fix: use DST-friendly tz calculation for TimeSlot end times

Around DST changes, localize(time + duration).astimezone() is not
the same as localize(time).astimezone() + duration. The latter allows
tz-aware times to do their magic and give correct clock times.

* fix: refactor/correct calculation of week-view event start/end times

There were bugs in the timestamp calculations around DST switchover.
This corrects those and tries to clarify and improve documentation in
the relevant code.
2022-05-11 16:08:47 -05:00
Jennifer Richards 7738319c2a
fix: render meeting schedule editor icons using bootstrap-icons (#3777)
Uses template tags to render `ConstraintName` instances as HTML. Fixes #3557.
2022-04-05 18:57:08 -03:00
Robert Sparks 6ecd4b40e2
fix: use better address calculation for schedule owner. Fixes #2611. (#3709) 2022-03-21 10:21:22 -03:00
Jennifer Richards 686a9150b3 Merge remote-tracking branch 'origin/main' into personal/jennifer/7.45.1.dev0.bootstrap-merge
# Conflicts:
#	ietf/templates/meeting/session_buttons_include.html
2022-03-04 15:14:52 -04:00
Robert Sparks bc8155f197 Add link to onsite tool to agenda. Fixes #3550. Commit ready for merge.
- Legacy-Id: 19947
2022-02-18 15:12:21 +00:00
Jennifer Richards 6c260a5b7e Merge 7.45.1.dev0 into Bootstrap 5 update branch. Made a first pass at reconciling differences.
- Legacy-Id: 19945
2022-02-17 20:09:49 +00:00
Lars Eggert cf629a42ad And more fixes.
- Legacy-Id: 19877
2022-01-25 10:14:25 +00:00
Jennifer Richards fd0df6f619 Add ability to import session minutes from notes.ietf.org. Mock out calls to the requests library in tests. Call markdown library through a util method. Fixes #3489. Commit ready for merge.
- Legacy-Id: 19763
2021-12-09 17:16:19 +00:00
Jennifer Richards d7f20342b6 Tear out old meeting schedule editor and related code
- Legacy-Id: 19551
2021-11-04 17:07:22 +00:00
Jennifer Richards 7b35c09c40 Eliminate the officehours timeslot type, update/renumber migrations, mark offagenda/reserved TimeSlotTypeNames as not used, add a 'none' SessionPurposeName and disallow null, update agenda filter keywords/filter helpers, fix broken tests and general debugging
- Legacy-Id: 19550
2021-11-04 17:06:06 +00:00
Jennifer Richards 3dfce7b850 Update purpose/types after discussions, add on_agenda Session field, prevent session requests for groups with no allowed purpose, handle addition fields in session request, fix editing session requests, add session edit form/access from schedule editor, eliminate TimeSlotTypeName "private" field, add server-side timeslot type filtering to schedule editor
- Legacy-Id: 19549
2021-11-04 17:01:32 +00:00
Jennifer Richards 173e438aee Add 'closed' session purpose, assign purposes for nomcom groups, and update schedule editor to enforce timeslot type and allow blurring sessions by purpose
- Legacy-Id: 19427
2021-10-15 19:33:33 +00:00
Jennifer Richards 1054f90873 Snapshot of dev work to add session purpose annotation
- Legacy-Id: 19415
2021-10-12 17:08:58 +00:00
Jennifer Richards 2060173f3a Improve proceedings display with new title block, configurable host logos, and additional PDF or URL materials. Fixes #3147. Commit ready for merge.
- Legacy-Id: 19306
2021-08-30 17:02:49 +00:00
Jennifer Richards b88a695ad1 Allow generated schedules to inherit from a base schedule. Fixes #3170. Commit ready for merge.
- Legacy-Id: 19297
2021-08-10 14:22:06 +00:00
Jennifer Richards 336d762123 Allow configuration of group conflict types used for each meeting Fixes #2770. Commit ready for merge.
- Legacy-Id: 19266
2021-07-30 17:50:24 +00:00
Jennifer Richards 66b9c41dcc Add ConstraintNames for chair, tech, and key participant conflicts. Replace temporary UI workaround with proper conflict type handling. Fixes #3083. Commit ready for merge.
- Legacy-Id: 19103
2021-06-09 19:36:27 +00:00
Robert Sparks 2a9b60c4da guard against many sessions.
- Legacy-Id: 19087
2021-06-06 14:16:08 +00:00
Robert Sparks 3571a4cd86 Merged in [19074] from kivinen@iki.fi:
Adds new filtering tags for sessions which have multiple sessions. I.e., in addition to wg,area,type there is wg-sessa, wg-sessb or wg-sessc etc on the tags, so now you can filter either all wg sessions or only specific sessions. Also removes the unused session.order_number, but not yet the session.order_in_meeting() function (which I think is unused too).
 - Legacy-Id: 19080
Note: SVN reference [19074] has been migrated to Git commit ddefdecca7
2021-06-04 20:21:49 +00:00
Tero Kivinen ddefdecca7 Adds new filtering tags for sessions which have multiple sessions. I.e., in addition to wg,area,type there is wg-sessa, wg-sessb or wg-sessc etc on the tags, so now you can filter either all wg sessions or only specific sessions. Also removes the unused session.order_number, but not yet the session.order_in_meeting() function (which I think is unused too).
- Legacy-Id: 19074
2021-06-03 20:03:14 +00:00
Mark J. Donnelly e3ee370981 First swipe at making past sessions unchangable for official schedules
This change locks down the schedule of any meeting that is fully in the past.  It leaves open sessions that have finished for meetings that have not yet finished.

Addresses (partially) issue #3083.  Commit ready for merge.
 - Legacy-Id: 19030
2021-05-21 20:38:51 +00:00
Robert Sparks 3697180cc1 Reverted merge of timezone-aware migration efforts.
- Legacy-Id: 18792
2021-01-12 16:54:20 +00:00
Henrik Levkowetz d9ad8b8616 Removed some dead code, simplified TimeSlot *_start_time() and *_end_time() methods, and added TimeSlot.local_date().
- Legacy-Id: 18784
2020-12-19 22:52:07 +00:00
Henrik Levkowetz 774e752a54 Snapshot of timezone-aware datatracker code. Tests pass, and the test-crawler shows only expected differences. Trunk changes merged in up to r18768.
- Legacy-Id: 18770
2020-12-16 23:53:37 +00:00
Robert Sparks 8ab7a30ba3 Merged in [18724] from jennifer@painless-security.com:
Allow cancellation of individual sessions of multi-session interim meeting. Fixes #2959.
 - Legacy-Id: 18757
Note: SVN reference [18724] has been migrated to Git commit 79971e14c7
2020-12-11 21:13:33 +00:00
Henrik Levkowetz 44adc2c3a8 Added additional sorting of Session.constraints() return value to make page rendering stable.
- Legacy-Id: 18738
2020-12-08 14:10:02 +00:00
Henrik Levkowetz 9a8c6ae3f4 Added ordering to Session.constratints() to make page renderings stable.
- Legacy-Id: 18727
2020-12-03 15:40:28 +00:00
Jennifer Richards 79971e14c7 Allow cancellation of individual sessions of multi-session interim meeting. Fixes #2959. Commit ready for merge.
- Legacy-Id: 18724
2020-12-01 17:37:09 +00:00
Henrik Levkowetz 088033d843 Added matching indexes to a number of models with ordering by multiple keys.
- Legacy-Id: 18664
2020-11-09 19:41:12 +00:00
Henrik Levkowetz 9b6c5735c9 Change the length of the schedule name field from 16 to 64, to avoid running into lenght issues for schedule names auto-generated from person name or email.
- Legacy-Id: 18566
2020-10-08 11:58:46 +00:00
Henrik Levkowetz f9b3e2e477 Merged in ^/branch/iola/meeting-improvement-r18382@18466. This provides a beta-level snapshot of the new schedule editor work. All known issues should be fixed, but there might be adjustments needed after experience with using the new edit view.
- Legacy-Id: 18467
2020-09-04 14:28:25 +00:00
Henrik Levkowetz e9bebe1274 Merged in [18103] from olau@iola.dk:
Prefetch a couple of things in the agenda view to reduce the number of
queries for IETF 106 from about 3800 to about 235.
 - Legacy-Id: 18452
Note: SVN reference [18103] has been migrated to Git commit a373f1d55c
2020-08-31 20:09:03 +00:00
Henrik Levkowetz 2603bf4a23 Merged in [18371] from mark@painless-security.com:
Track slide submissions even after acceptance or rejection.  Fixes #2835.
 - Legacy-Id: 18421
Note: SVN reference [18371] has been migrated to Git commit 21ba67fb79
2020-08-26 16:47:35 +00:00
Henrik Levkowetz cbfbedf2d3 Updated the IETF meeting agenda rendering so as to show the session links to materials, meetecho, jabber, notepad etc. also for narrov-screen devices such as phones, based on code from lars@eggert.org. Also moved some template code doing markup tweaking of the room name to a TimeSlot method, and factored out session start- and end-time display, repeated in 4 locations, to a template snipped. Added a new CSS class which provides less padding at the sides of pages on narrow devices.
- Legacy-Id: 18403
2020-08-21 13:40:14 +00:00
Ole Laursen a39fa7f967 New branch from trunk @ r18382 for meeting improvements, with iola/meeting-improvement-r17835 merged in
- Legacy-Id: 18385
2020-08-20 09:36:41 +00:00
Mark J. Donnelly 21ba67fb79 Track slide submissions even after acceptance or rejection. Fixes #2835. Commit ready for merge.
- Legacy-Id: 18371
2020-08-13 13:48:01 +00:00
Ole Laursen c78ffbcd18 Introduce support for setting a base schedule on a schedule. All
assignments on the base schedule are shown in the pages for the
schedule, read-only.

This allows managing things like breaks and misc sessions separately
from the regular WG sessions.

Base schedules are not allowed to be the base of other base schedules
(the hierarchy can only be one level deep) to simplify the mental
model and the code.

Add link for creating new schedules instead of relying on copying
Empty-Schedule and change the meeting creation code to no longer
create the special Empty-Schedule. Instead a "base" schedule is
created and a first schedule with the name and permissions of the user
creating the meeting, using "base" as base.

Speed up a couple of the Secretariat/AD agenda views by adding
prefetches.
 - Legacy-Id: 18355
2020-08-11 17:34:32 +00:00
Ole Laursen 824b1b627b Add Schedule.origin to enable tracking where a schedule was copied
from. Add utility function and view for diff'ing two arbitrary
schedules, and modify the schedule list page to show the number of
differences between the origin of a schedule, linking to the diff, to
make it easy to see what's changed between work-in-progress schedules.
 - Legacy-Id: 18337
2020-08-04 17:26:50 +00:00
Henrik Levkowetz 3bc0cb4c35 Changed a list of group types in all_meeting_sessions_for_group() to instead use group.features.
- Legacy-Id: 18318
2020-07-30 13:55:21 +00:00
Mark J. Donnelly b6c3a8f1f8 Add IETF sessions to the types that emit parent group name in the session assignment slug, so that the parent group name will be present on the HTML row ID in the agenda for IAB sessions. Also update the wording on special sessions. Fixes #3034. Commit ready for merge.
- Legacy-Id: 18282
2020-07-27 04:31:50 +00:00
Henrik Levkowetz 34ca5946bf Merged in [18206] from rjsparks@nostrum.com:
Allow modelforms, particularly the admin, to treat joint_with_groups as a optional field. Fixes #3029.
 - Legacy-Id: 18216
Note: SVN reference [18206] has been migrated to Git commit 7a48a2b497
2020-07-21 21:30:38 +00:00