Commit graph

149 commits

Author SHA1 Message Date
Robert Sparks f8113cb862
fix: close open things (#5593)
* fix: close open things

* fix: clean up test created files

* fix: remove one close too many
2023-05-10 11:19:34 -05:00
Robert Sparks 3fb521eb53
fix: test on postgres. POST and check intended pks. (#4949)
* fix: test on postgres. post and check intended pks.

* fix: pass and check intended pks

* fix: pass intended pk

* fix: get an actually usable group type for test

* fix: use a review assignment pk instead of the review request pk

* fix: Use pks of sessions, not schedtimesessassignments

* fix: test for actual pk and do not rely on case-insensitive LIKE

* fix: test for actual pk

* chore: spelling correction: nomine -> nominee
2023-01-10 10:28:43 -06:00
Jennifer Richards 27469c1264
fix: do not create ReviewRequestDocEvent when assigning a review req (#4913)
* fix: do not create ReviewRequestDocEvent when assigning a review req

* test: test docevent creation
2022-12-16 15:17:10 -06:00
Jennifer Richards 5a55ec0959
test: fix date-related timezone errors in tests (#4717)
* test: compare UTC dates in test_search_mail_archive()

* test: compare datetimes, not dates, in action holders test

* test: adjust test to match TZ used for IPR notification message

* test: fix timezone in date_today() calls for liaisons tests

* test: use settings.TIME_ZONE for date in nomination tests

* test: correctly use settings.TIME_ZONE instead of system time zone
2022-11-07 09:54:35 +00:00
Lars Eggert d16a9e77a7
fix: Fix transient test failures due to i18n names (#4695)
* Search for escaped name in HTML output

* Need to check for `plain_name()` in sent emails

* Normalize i18n Unicode names in the same way the database does
2022-11-06 12:29:49 +00:00
Jennifer Richards 3220bf3c40
chore: replace last few datetime.date.today() calls with date_today() 2022-10-18 12:45:47 -03:00
Jennifer Richards 56505147e0
fix: handle timezones in a bunch of places 2022-09-23 16:11:49 -03:00
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 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
Lars Eggert 3234f1a121
test: Validate HTML rendered during tests (#3782) 2022-04-07 13:30:38 -03:00
Lars Eggert a507b31669 More nits fixed.
- Legacy-Id: 19903
2022-02-01 08:29:55 +00:00
Lars Eggert 335a39d4fc More fixes.
- Legacy-Id: 19884
2022-01-28 13:00:47 +00:00
Lars Eggert cf629a42ad And more fixes.
- Legacy-Id: 19877
2022-01-25 10:14:25 +00:00
Lars Eggert 9c05373699 More fixes.
- Legacy-Id: 19856
2022-01-18 20:04:55 +00:00
Lars Eggert e9fd78128c Interim commit
- Legacy-Id: 19765
2021-12-09 18:26:53 +00:00
Lars Eggert f974fd3c04 Fix more things
- Legacy-Id: 19762
2021-12-09 06:41:00 +00:00
Jennifer Richards 81d9234d54 Use temporary directories instead of "real" filesystem for tests. Fixes #3414. Commit ready for merge.
- Legacy-Id: 19555
2021-11-05 19:45:57 +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 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 c8361aba80 Repair warning call for duplicate review submission. Improve testing. Additional fix for #3092. Commit ready for merge.
- Legacy-Id: 18627
2020-10-22 21:04:37 +00:00
Henrik Levkowetz 29d1a0b362 Merged in [18533] from rjsparks@nostrum.com:
Replaced review name collision resolution code with a decision to not save when it occurs. Fixes #3092.
 - Legacy-Id: 18559
Note: SVN reference [18533] has been migrated to Git commit 0ff5172a89d5a7ad48cb1fd03b1c8926e26e50f9
2020-10-04 13:36:44 +00:00
Henrik Levkowetz bc05e7a8d0 Refactored many instances of msg.get_payload(decode=True).decode('utf-8') and similar to get_payload_text(msg), which uses msg.get_charset() to get the actual charset to do the decoding, in a consistent manner. Also removed some instances of force_str, but more remain.
- Legacy-Id: 17807
2020-05-16 20:20:05 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Robert Sparks d22da6259b Only gather addresses instead of name_addrs for the group_secretaries Mailtrigger Recipient. Fixes #2847. Commit ready for merge.
- Legacy-Id: 17148
2019-12-13 18:37:30 +00:00
Henrik Levkowetz fcb6806d17 Merged in work from sasha@dashcare.nl on Review Queue Managemnt:
This abstracts queue management, making it possible to implement different
policies for each team. It provides two concrete policies:
RotateAlphabeticallyReviewerQueuePolicy, which rotates an alphabetically
ordered reviewer list with consideration for skip indications, and is the
default policy; and LeastRecentlyUsedReviewerQueuePolicy, a simple
least-recently-used policy.  Also see issues #2721 and #2656.
 - Legacy-Id: 17121
2019-12-04 23:02:52 +00:00
Henrik Levkowetz fc0060079a Merged in [17085] from sasha@dashcare.nl:
Fix #2278 - Notify secretary when a review request is closed.
The assigned reviewer was already notified, but secretaries were always
excluded.
 - Legacy-Id: 17108
Note: SVN reference [17085] has been migrated to Git commit 56003f66d8
2019-11-27 22:19:58 +00:00
Henrik Levkowetz 2c28cb3eb0 When group secretary email addresses occurred in some mailtrigger To: entries, they were given with both name and address parts, while when occurring in Cc: entries, no names were present. Fixed one case of this, and adjusted a test case for consistency. Also added a more general utility function to exclude selected email addresses from email address lists.
- Legacy-Id: 17107
2019-11-27 21:49:22 +00:00
Henrik Levkowetz 2bc5606986 Merged in [17070] from sasha@dashcare.nl:
Fix #2061 - Improve 'complete review' workflow for secretaries.
When a secretary completes a review, 'link to a review message'
is automatically selected, and the first non-reply mail is used to
fill in the review details. The secretary can still modify all details.
The order of fields for secretaries is also modified to fit this workflow.
All cases where 'link to review message' is used, by reviewers or
secretaries, now attempt to fill in the 'reviewed version' if found
in the email subject.
 - Legacy-Id: 17105
Note: SVN reference [17070] has been migrated to Git commit dc9546211f
2019-11-26 20:22:56 +00:00
Sasha Romijn 10a7bee637 Merge reviewer-queue-management on top of 6.111.1.dev0
- Legacy-Id: 17094
2019-11-22 12:35:28 +00:00
Robert Sparks a33ba86452 Add pages to assignment email. Fixes #2838. Commit ready for merge.
- Legacy-Id: 17090
2019-11-21 22:41:11 +00:00
Sasha Romijn 56003f66d8 Fix #2278 - Notify secretary when a review request is closed.
The assigned reviewer was already notified, but secretaries were always
excluded.

Commit ready for merge.
 - Legacy-Id: 17085
2019-11-21 11:03:21 +00:00
Henrik Levkowetz 424dcfb42d Some tweaks related to the changes related to #2830.
- Legacy-Id: 17076
2019-11-21 06:01:56 +00:00
Henrik Levkowetz f0adebbe70 Merged in [17062] from rjsparks@nostrum.com:
Change the default template for assigned review emails to name the assigned reviewer. Fixes #2830.
 - Legacy-Id: 17073
Note: SVN reference [17062] has been migrated to Git commit 38e73b6f89
2019-11-21 01:32:10 +00:00
Sasha Romijn dc9546211f Fix #2061 - Improve "complete review" workflow for secretaries.
When a secretary completes a review, "link to a review message"
is automatically selected, and the first non-reply mail is used to
fill in the review details. The secretary can still modify all details.
The order of fields for secretaries is also modified to fit this workflow.

All cases where "link to review message" is used, by reviewers or
secretaries, now attempt to fill in the "reviewed version" if found
in the email subject.

Commit ready for merge.
 - Legacy-Id: 17070
2019-11-20 14:25:05 +00:00
Robert Sparks 38e73b6f89 Change the default template for assigned review emails to name the assigned reviewer. Fixes #2830. Commit ready for merge.
- Legacy-Id: 17062
2019-11-19 21:27:23 +00:00
Sasha Romijn 8bb6955d47 Fix #2418 - Account for previous rejected reviews in recommended assignment order
- Legacy-Id: 17053
2019-11-18 19:50:33 +00:00
Sasha Romijn c36fcdc5a7 Update update_policy_state_for_assignment for new policies, fix tests,
fix some other minor things.
 - Legacy-Id: 17023
2019-11-13 14:39:42 +00:00
Henrik Levkowetz 68b0e42e94 Tweaked a test person name to match the usage in the code tested.
- Legacy-Id: 17020
2019-11-12 18:22:42 +00:00
Henrik Levkowetz 4049804920 Merged in [16981] from rjsparks@nostrum.com:
Look at the tree of replaces-relationships when determining if some reviewer has reviewed this (or perhaps an ancestor) of this document. Fixes #2821.
 - Legacy-Id: 16992
Note: SVN reference [16981] has been migrated to Git commit f740adcfc1
2019-11-11 16:57:40 +00:00
Sasha Romijn 1c84e3c363 Add additional tests for queue policies and fix unused import.
- Legacy-Id: 16990
2019-11-11 16:32:49 +00:00
Sasha Romijn ce812a3a4f - Make skipping unavailable reviews the default, except for the
reviewer_overview page.
- Make default_reviewer_rotation_list use a consistent return type
 - Legacy-Id: 16986
2019-11-11 14:47:37 +00:00
Henrik Levkowetz 20eb9d8ac1 Merged in [16939] from sasha@dashcare.nl:
Fix #2050 - Allow adding review wishes from document and search pages.
On the main page of a document and in document search results, a new
button allows review team members to add a review wish for that document.

For reviewers that are only on one team, this essentially works
identical to tracking a document. Reviewers that are on multiple teams
are lead through an intermediate step to select a review team, and then
returned to their search or document page.
 - Legacy-Id: 16985
Note: SVN reference [16939] has been migrated to Git commit 6e55f26dbd
2019-11-11 14:22:54 +00:00
Sasha Romijn b5a31c3c6a Update some terminology and docstrings.
- Legacy-Id: 16983
2019-11-11 12:31:16 +00:00
Robert Sparks f740adcfc1 Look at the tree of replaces-relationships when determining if some reviewer has reviewed this (or perhaps an ancestor) of this document. Fixes #2821. Commit ready for merge.
- Legacy-Id: 16981
2019-11-07 23:02:19 +00:00
Sasha Romijn e518824a69 Initial refactoring of the current reviewer assignment code.
- Legacy-Id: 16961
2019-11-05 16:39:31 +00:00
Sasha Romijn eab14ea1c5 Early work to extract reviewer policy from review/utils.py.
- Legacy-Id: 16950
2019-10-31 15:01:14 +00:00
Sasha Romijn 6e55f26dbd Fix #2050 - Allow adding review wishes from document and search pages.
On the main page of a document and in document search results, a new
button allows review team members to add a review wish for that document.

For reviewers that are only on one team, this essentially works
identical to tracking a document. Reviewers that are on multiple teams
are lead through an intermediate step to select a review team, and then
returned to their search or document page.

Commit ready for merge.
 - Legacy-Id: 16939
2019-10-29 16:27:56 +00:00
Henrik Levkowetz c606461b22 Merged in [16924] from sasha@dashcare.nl:
Fix #2217 - Allow submission of unsolicited reviews by secretaries.
- For team secretaries, a button 'Submit unsolicited review' will now
  appear next to 'Request review' on the document's main page.
- If the secretary is a secretary for multiple teams, they are taken
  through an intermediate page to select for which team they are
  submitting their review.
- The form is similar (and using the same code) as the usual review
  completion, with a few extra fields for the review type and reviewer,
  which would usually already be known.
- When submitting the review, a ReviewRequest and ReviewAssignment are
  automatically created. The assignment is then immediately closed in
  the usual way.
- Other workflows are unchanged.
The issues with the review form in #2061 are slightly worse for the
unsolicited review scenario, but that will be improved when #2061 is
fixed.
 - Legacy-Id: 16932
Note: SVN reference [16924] has been migrated to Git commit 871a4b653b
2019-10-26 21:16:53 +00:00
Henrik Levkowetz 00fb8d4b43 Merged in [16923] from sasha@dashcare.nl:
Fix #2087 - Show doc authors and WG chairs in unassigned reviews views.
 - Legacy-Id: 16931
Note: SVN reference [16923] has been migrated to Git commit 93797b3fc1
2019-10-26 20:26:21 +00:00
Henrik Levkowetz 09c34fa131 Merged in [16921] from sasha@dashcare.nl:
Fix #2123 - Use a DBTemplate when a review assignment is mailed.
The message sent to a reviewer when a new review is assigned to them,
is now taken from a DBTemplate, allowing it to be customised
per team. This includes a migration to create a default template,
which looks the same as before.
 - Legacy-Id: 16928
Note: SVN reference [16921] has been migrated to Git commit 9df5839874
2019-10-26 15:16:18 +00:00