Commit graph

157 commits

Author SHA1 Message Date
Jennifer Richards 08e953995a
feat: better reject null characters in forms (#7472)
* feat: subclass ModelMultipleChoiceField to reject nuls

* refactor: Use custom ModelMultipleChoiceField

* fix: handle value=None
2024-05-28 10:34:55 -05:00
Robert Sparks d9cc26be96
feat: replace references to User with references to Person (#6024)
* refactor: change references from User to Person (#5821)

* refactor: Change CommunityList reference from User to Person

* refactor: Convert more user references to person

* refactor: Change augment_docs_and_user_with_user_info to person

* refactor: Change Nomination and Feedback references from User to Person

* refactor: Change a few test case function signatures to be more pythonic

* refactor: Harmonize how profile and photo views look up email_or_name

* refactor: Rework community views to operate on Person instead of User (#5859)

* test: Update tests to try all of the person's emails and aliases

* fix: Recode a test case to avoid an exception if there's Unicode in the URL

This only happens using the form-filling and submission feature of
WebTest, which is only used in this one test case, so just it rip out.

* test: Add duplicate-person tests

* fix: If there are multiple matching users, prefer the logged-in one.

* chore: We no longer use WebTest, so don't include it.

* fix: Address review comments

* fix: case-insensitive person name or email matching (#6096)

* chore: Renumber migrations

* fix: Update merged code so tests pass (#6887)

* fix: Use refactored method

* fix: Don't assume user has person

* fix: Use new view param name

* chore: Drop community lists w/o person; cleanup (#6896)

* fix: Don't assume user has person

* fix: user->person in update_community_list_index.py

* feat: Remove CommunityLists without Person

* refactor: Speed up nomcom migrations

---------

Co-authored-by: Paul Selkirk <paul@painless-security.com>
Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2024-01-24 11:00:19 -06:00
Paul Selkirk 06c9f06d55
feat: Reclassify nomcom feedback (#6002)
* fix: Clean up view_feedback_pending

- Remove "Unclassified" column header, which caused misalignment in the table body.

- Show the message author - previously displayed as `(None)`.

* feat: Reclassify nomcom feedback (#4669)

- There's a new `Chair/Advisor Tasks` menu item `Reclassify feedback`.

- I overloaded `view_feedback*` URLs with a `?reclassify` parameter.

- This adds a checkbox to each feedback message, and a `Reclassify` button
at the bottom of each feedback page.

- "Reclassifying" basically de-classifies the feedback, and punts it back
to the "Pending emails" view for reclassification.

- If a feedback has been applied to multiple nominees, declassifying it
from one nominee removes it from all.

* fix: Remove unused local variables

* fix: Fix some missing and mis-nested html

* test: Add tests for reclassifying feedback

* refactor: Substantial redesign of feedback reclassification

- Break out reclassify_feedback* as their own URLs and views,
  and revert changes to view_feedback*.html.

- Replace checkboxes with a Reclassify button on each message.

* fix: Remember to clear the feedback associations when reclassifying

* feat: Add an 'Overcome by events' feedback type

* refactor: When invoking reclassification from a view-feedback page, load the corresponding reclassify-feedback page

* fix: De-conflict migration with 0004_statements

Also change the coding style to match, and add a reverse migration.

* fix: Fix a test case to account for new feedback type

* fix: 842e730 broke the Back button

* refactor: Reclassify feedback directly instead of putting it back in the work queue

* fix: Adjust tests to new workflow

* refactor: Further refine reclassification to avoid redirects

* refactor: Impose a FeedbackTypeName ordering

Also add FeedbackTypeName.legend field, rather than synthesizing it every
time we classify or reclassify feedback.

In the reclassification forms, only show the relevant feedback types.

* refactor: Merge reclassify_feedback_* back into view_feedback_*

This means the "Reclassify" button is always present, but eliminates some
complexity.

* refactor: Add filter(used=True) on FeedbackTypeName querysets

* refactor: Add the new FeedbackTypeName to the reclassification success message

* fix: Secure reclassification against rogue nomcom members
2023-08-08 12:33:17 -05:00
Robert Sparks ac65232115
fix: improve when Message objects are created (#5836)
* fix: improve when Message objects are created

* test: further improve feedback test

* fix: improve and test another form

* test: Restructure test infrastructure
2023-06-16 15:51:31 -05:00
Lars Eggert 220be21998
chore: Use codespell to fix typos in code. (#4797)
* chore: Use codespell to fix typos in code.

Second part of replacement of #4651

@rjsparks, I probably need to revert some things here, and I also
still need to add that new migration - how do I do that?

* Revert migrations

* Migrate "Whitelisted" to "Allowlisted"

* TEST_COVERAGE_MASTER_FILE -> TEST_COVERAGE_MAIN_FILE

* Fix permissions

* Add suggestions from @jennifer-richards
2022-12-07 15:10:35 -06:00
Jim Fenton 3aab73d862
feat(nomcom): Allow nomcom chair to turn volunteer acceptance on and off (#4251)
* feat(nomcom): Allow nomcom chair to turn volunteer acceptance on and off
Fixes #4105
Also allows chair to set date of first call for volunteers. If this should be read-only and set by the code, let me know.

* fix(nomcom): Correct helptext for accepting volunteers
2022-07-24 08:51:57 -05: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 c68446ae93 More select2 and test fixes.
- Legacy-Id: 19781
2021-12-14 18:19:12 +00:00
Jennifer Richards 8759955597 Allow nomcom chair to edit liaisons as well as members and generate GroupEvents when changed. Share code between group and nomcom for this purpose. Fixes #3376. Commit ready for merge.
- Legacy-Id: 19710
2021-11-24 16:40:05 +00:00
Robert Sparks 86102b9980 Allow people to volunteer for NomCom via the datatracker. Commit ready for merge.
- Legacy-Id: 19104
2021-06-10 20:35:50 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz 566971a6ae Removed further six usage.
- Legacy-Id: 17386
2020-03-05 15:10:33 +00:00
Henrik Levkowetz e9a37d8ac8 Removed six.text_type(), changed six.moves.urllib to plain urllib, and removed now unused six imports.
- Legacy-Id: 17385
2020-03-05 14:41:41 +00:00
Robert Sparks c9d944b312 Make it easier for the nomcom chair to manage generic IESG requirements. Fixes #2794. Commit ready for merge.
- Legacy-Id: 17201
2020-01-08 19:51:14 +00:00
Robert Sparks cca04b6330 Correct construction for a reverse URL in an edge case. Fixes #2815. Commit ready for merge.
- Legacy-Id: 16907
2019-10-22 18:24:57 +00:00
Henrik Levkowetz 77abc3868e Type checking tweaks.
- Legacy-Id: 16867
2019-10-15 16:54:33 +00:00
Henrik Levkowetz 33e8733b91 Fixed up mypy issues or added type:ignore comments as needed for a clean mypy run.
- Legacy-Id: 16772
2019-09-30 15:42:18 +00:00
Henrik Levkowetz bdc73e771a Python2/3 compatibility: replaced six.ensure_text() with either six.text_type or django's force_text(), depending on the case, and fixed a variable scope issue.
- Legacy-Id: 16461
2019-07-16 13:20:05 +00:00
Henrik Levkowetz 8c6eb3a30a Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
- Legacy-Id: 16458
2019-07-15 19:14:04 +00:00
Henrik Levkowetz 1e115539c4 The previous nomcom.fields.EncryptedTextField relied on initial cleartext content having the same type as ciphertext. Under Python3, that's not the case (ciphertext has type bytes). Rewrote the nomcom app and tests to handle capture of comments and encryption to the Feedback.comments ciphertext differently.
- Legacy-Id: 16350
2019-07-01 11:59:59 +00:00
Henrik Levkowetz d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz e20e8b7df5 Changed the mail sending routines so it's possible to not copy the debug archive on some messages.
- Legacy-Id: 15585
2018-10-16 14:32:10 +00:00
Henrik Levkowetz fc027ae161 Built out test_edit_nomcom_view() to also test adding and removing reminder dates.
- Legacy-Id: 15524
2018-10-06 13:01:08 +00:00
Henrik Levkowetz 2c2effde4f Added a form clean() for the reminder dates of the nomcom edit form, to make something appropriate out of edits that remove reminder dates, rather than clicking 'delete'. This fixes a potential exception, when a blank date cannot be saved, and also does what the user expected (deletes a blanked date).
- Legacy-Id: 15521
2018-10-04 18:03:41 +00:00
Robert Sparks 4d5de5dee6 Allow a nomcom to show nominees that have accepted nomination before feedback is open. Fixes #2598. Commit ready for merge.
- Legacy-Id: 15486
2018-09-26 18:57:30 +00:00
Peter E. Yee 047b91862c Fixed 2 trivial spelling errors in NomCom tools. Fixes issue #2569. Commit ready for merge.
- Legacy-Id: 15441
2018-08-17 04:24:51 +00:00
Henrik Levkowetz 0bd9dbaab3 Removed some unused imports.
- Legacy-Id: 14509
2018-01-11 15:00:02 +00:00
Henrik Levkowetz 5e0335bbe3 Removed some dead code.
- Legacy-Id: 14508
2018-01-11 13:22:04 +00:00
Robert Sparks 94f4e9ac58 Simplify the edit nomcom members forms. Fixes #1756. Commit ready for merge.
- Legacy-Id: 14504
2018-01-10 18:26:20 +00:00
Henrik Levkowetz 166c7531f9 Changed the nomcom code to permit nomcom year interpolation in the nomcom from-address and in nomcom templates. Changed the nomcom from-address setting to 'nomcom-chair-{year}@ietf.org'.
- Legacy-Id: 14175
2017-09-27 21:20:59 +00:00
Henrik Levkowetz d041edf1b3 Merged in [13501] from rjsparks@nostrum.com:
Use a simpler widget for the public key file when editing a nomcom to remove confusion between clearing keys and clearing the form control. Fixes #2299.
 - Legacy-Id: 13519
Note: SVN reference [13501] has been migrated to Git commit ca76f5c8f0fbf0832440680381380995b0092ea7
2017-06-04 19:40:26 +00:00
Robert Sparks 4813177086 Allow the nomcom to collect feedback on arbitrary topics. Fixes #2256 and #1846. Commit ready for merge.
- Legacy-Id: 13474
2017-05-30 19:54:31 +00:00
Robert Sparks c49abdd557 Allow nomcoms to configure the feedback page to show nominee pictures. Fixes #2252. Commit ready for merge,
- Legacy-Id: 13413
2017-05-23 22:18:04 +00:00
Robert Sparks ac8e5f5402 Make it possible to close nominations without closing feedback. Fixes #2255. Commit ready for merge.
- Legacy-Id: 13399
2017-05-22 18:40:05 +00:00
Lars Eggert 8a70e9773d Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Henrik Levkowetz 5f053ad21a Cleaned up the remaining explicit url names, using dotted-paths to view
functions instead.  In all almost 700 changes.
 - Legacy-Id: 12923
2017-02-26 23:21:49 +00:00
Henrik Levkowetz 6de7be6953 Specified strip=False for another bunch of CharField form fields with Textarea widgets.
- Legacy-Id: 12711
2017-01-23 17:38:56 +00:00
Henrik Levkowetz 7b95411f58 The context_instance parameter to render_to_response() and render_to_string() is now deprecated. Fixed this, and generally changed the idiom render_to_response('template.html', {}, RequestContext(request)) to the newer and simpler render(request, 'template.html', {}). About 200 instances.
- Legacy-Id: 12637
2017-01-09 21:26:30 +00:00
Henrik Levkowetz 90bf63f01e Fixed the import path for formtools.
- Legacy-Id: 12263
2016-11-03 20:54:35 +00:00
Henrik Levkowetz 236fb3e185 Make it possible to merge nominations with inactive email addresses in the Nominee Merge form.
- Legacy-Id: 12091
2016-10-05 17:03:31 +00:00
Henrik Levkowetz 851b9b3d2f Fixed a problem with the error message text for the nominee email edit form.
- Legacy-Id: 12087
2016-10-05 15:14:33 +00:00
Henrik Levkowetz 26fcce9c28 Brought back the nomcom nominee merge functionality which was inadvertently removed in January. There is now both a Merge Nominee and a Merge Person form, with additional instructions which should make it easier to choose the right one for the task.
- Legacy-Id: 12017
2016-09-22 14:23:20 +00:00
Henrik Levkowetz ec684e1b4e Added a pylint rc-file, and fixed or silenced a number of issues found by pylint using the settings .pylintrc (which enable only error checking).
- Legacy-Id: 11941
2016-09-08 14:48:59 +00:00
Henrik Levkowetz 6c8629c4a9 Merged in [10629] from rjsparks@nostrum.com:
This set of changes focuses on improvements to the nomcom portion of
    the datatracker. 

    These changes:

    - Simplify the nomcom form for comments. Make it more obvious who
      receives mail when a comment is supplied. Fixes #1849.

    - Simplify the nomcom form for nominations. Provide a primary workflow
      where nominations choose an existing Person, and a secondary
      workflow for nominating new people. 

    - Allow nominees to add a comment when accepting or declining a
      nomination. Fixes #1845.

    - Organize the list of nominees on the feedback page. Fixes #1786 and
      #1809.

    - Simplify the mechanisms used to display feedback message counts.

    - Regroup the feedback view to make it easier to see where to spend
      review effort. Fixes #1866.

    - Capture when nomcom members last reviewed feedback for a given
      nominee. Add badges when new feedback is avaliable. Improve the
      layout of the feedback index page. Fixes #1850.

    - Reorganize the tab navigation on the nomcom private pages. Made it
      more obvious when the chair is doing something that only the chair
      gets to see. Fixes #1788 and #1795.

    - Regroup multiselect options to make classifying pending feedback
      simpler. Make the control larger and resizable. Fixes #1495.

    - Simplify the chair's views for editing nominee records. Replace the
      merge nominee form with a request to the secretariat to merge Person
      records. Fixes #1847. 

    - Added merging nominees to the secretariat's persson merging script. 

    - Show information for concluded nomcoms. Close feedback and
      nomination for concluded nomcoms. Fixes #1856.

    - Improve the questionnaire templates, reminding the nominee that
      receiving the questionnaire does not imply they have accepted a
      nomination. Fixes #1807.

    - Remove the description field from Postion. Simplify the Position
      list and the Position edit form. Make the nomcom pages more self
      documenting. Add a page to help nomcom chiars through setting up a
      new nomcom. Fixes #1867 and #1768.

    - Remove the type from the template pathname for the requirements
      templates. Make the requirements views work for both types plain and
      rst. Changed the default type for new nomcom requirement templates
      to rst.

    - Remove 'incumbent' from the models. Fixes #1771.

    - Adjust the models for Nominee and Nomination to better associate
      Nominee objects with Person objects.

    - Remove BaseNomcomForm and the implementation of custom fieldsets.

    - Replace the custom message framework with the django provided
      messages framework.

    - Improve SearchablePersonField to show the primary email address for
      any search result where a name appears more than once.

    - Add the use of factory-boy for generating test data. Normalize
      management of a test directory for test nomcom public keys.
      Significantly improve test coverage of the nomcom related code.
 - Legacy-Id: 10703
Note: SVN reference [10629] has been migrated to Git commit c8bbfbad78
2016-01-15 21:59:49 +00:00
Robert Sparks dc5ae398f2 Improved SearchablePersonField to show the primary email address for any search results where a name appears more than once.
Simplified the edit nominee form.
Replaced the merge nominee form with a request to the secretariat to merge Person records. Fixes #1847.
Added merging nominees to the secretariat's person merging script.
Restructured the person merging script to make it testable.
Updated some tests to match changes to the mailtriggers that hadn't made it to the fixtures.
 - Legacy-Id: 10625
2015-12-22 21:42:55 +00:00
Robert Sparks aadcf2d056 Added selecting existing people to the workflow for chair classification of nominations. Renamed some utility functions to be slightly more self-documenting.
- Legacy-Id: 10620
2015-12-22 04:32:48 +00:00
Robert Sparks 8261507e80 Added forms for the exceptional "create a new person for this nomination" workflow. Checkpointing before a round of simplification refactors.
- Legacy-Id: 10610
2015-12-18 23:11:24 +00:00
Robert Sparks 6bf4227974 Checkpoint: main nomination forms use SearchableEmailField
- Legacy-Id: 10609
2015-12-18 20:38:17 +00:00
Robert Sparks a2af7cfa25 Removed BaseNomcomForm and the notion of custom fieldsets
- Legacy-Id: 10608
2015-12-17 22:31:29 +00:00
Robert Sparks f68d546233 removed move_to_default
- Legacy-Id: 10603
2015-12-16 12:07:32 +00:00