Commit graph

35 commits

Author SHA1 Message Date
Jennifer Richards a338df16f2
fix: 404 instead of 300 for ambiguous email_or_person (#8004)
* fix: 404 on CommunityList name collision

* fix: 404 on ambiuous person for photo() view

* test: update tests

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2024-10-16 11:36:54 -05:00
Jennifer Richards c6389ba65f
fix: only send state change notifications once (#7953)
* feat: split state_change_event create / save

* refactor: avoid double-save in rfceditor.py

* feat: only send notifications on event creation

* test: update test_notification_signal_receiver()

* chore: update comment
2024-09-18 14:02:00 -05:00
Sangho Na 9d583ab9eb
fix: Use email or name when building community list view (#7203)
* fix: Use email or name when building community list view

instead of email

* test: add test case

* chore: remove debug

* fix: use name in community list menu when no active email is found

---------

Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2024-09-16 10:06:16 -05:00
Jennifer Richards f1d58da877
feat: send doc event emails via celery (#7680)
* feat: notify_event_to_subscribers_task

* fix: avoid circular import, handle error

* fix: don't queue task in test mode

* fix: don't even send mail in test mode

* test: separately test signal

* fix: if/else error

* test: better naming

* test: test the new task

* test: better test name

* test: refactor notify email test

* fix: save, not update

* test: restore template coverage
2024-07-12 10:10:46 -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
Robert Sparks 4fa8bfa543
fix: use correct doc types and states for rfcs (#6639) 2023-11-15 10:08:39 -04:00
Jennifer Richards 1660a14331
test: Use (rfc, published) state in test 2023-07-21 13:33:33 -03:00
Valery Smyslov a5f27b0a5b
feat: show expired WG/RG drafts at WG/RG Documents page (#4252)
* Show expired WG/RG drafts.

* Update 0009_add_group_exp_rule_to_groups.py

fix dependency on migration file name

* Update forms.py

Simplify condition statements

* Update views.py

Fix - remove erroneous check (never happen)

* Added tests for expired WG drafts filtering rule
2022-07-26 12:02:09 -05:00
Lars Eggert 5132661b06 More test fixes
- Legacy-Id: 19803
2022-01-05 11:25:25 +00:00
Lars Eggert e9fd78128c Interim commit
- Legacy-Id: 19765
2021-12-09 18:26:53 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz 2b1dd0f3e8 Merged in [16590] from rjsparks@nostrum.com:
Example of using webtest. The full testcase was not converted because the add_rule form is modified in-flight by javascript when a control value is changed.
 - Legacy-Id: 16609
Note: SVN reference [16590] has been migrated to Git commit e89f200abc0d9af7609e4bff3592f87eddee1359
2019-08-01 15:09:51 +00:00
Henrik Levkowetz b873af1eac Merged in [16583] from rjsparks@nostrum.com:
Restore ability to remove documents while managing a personal list. Required updating code to match the recent change to Document's primary key. Fixes #2757.
 - Legacy-Id: 16608
Note: SVN reference [16583] has been migrated to Git commit 821609888a2c8a6db67867dd334103b034157d20
2019-08-01 14:27:00 +00:00
Henrik Levkowetz e03784132d Merged changes from current trunk to Py3 branch.
- Legacy-Id: 16468
2019-07-16 15:36:16 +00:00
Henrik Levkowetz 2d7c9629aa Added 'from __future__' imports all over the place, to bring code behaviour into closer alignment between python2 and python3
- Legacy-Id: 16446
2019-07-15 15:40:51 +00:00
Henrik Levkowetz 8f3c420a62 Fixed a typo and some pyflakes issues.
- Legacy-Id: 16388
2019-07-04 20:47:34 +00:00
Henrik Levkowetz 05f275a3af Changed instances of json.loads(r.content) to r.json(). Changed some instances of assert* to assertContains.
- Legacy-Id: 16338
2019-06-30 20:44:45 +00:00
Henrik Levkowetz 15e74e89cb Converted instances of assertTrue(text in response.content) to the recommended assertContains(response, text), and similar for assertFalse(... in ...)
- Legacy-Id: 16336
2019-06-29 13:43:31 +00:00
Henrik Levkowetz f5f838ddf8 Added guards against duplicate m2m entries.
- Legacy-Id: 16304
2019-06-25 11:01:25 +00:00
Henrik Levkowetz db12f2b948 Fixed some name versus pk issues lingering after the Document/DocAlias primary key refactoring. Fixes issue #2729.
- Legacy-Id: 16288
2019-06-19 12:57:52 +00:00
Henrik Levkowetz 426870b766 Merged in the Document and DocAlias primary key change and m2m work in ^/personal/henrik/6.96.1-docalias.
- Legacy-Id: 16261
2019-06-15 12:00:48 +00:00
Henrik Levkowetz 815602351f This is a series of 50 migrations that changes the Document and DocAlias
primary keys from character strings to integers, and makes corresponding code
changes.

This was prompted by database limitations discovered when trying to make
DocAlias use a m2m document field; with 255 long strings as primary keys for
Document and DocAlias this violated the MySQL database limitations.

Changing the primary keys to integers should also improve efficiency.  

Due to the data migrations which create the new integer primary keys and adds
corresponding integer foreign keys matching the previous string foreign keys
in all tables having foreign keys to Document and DocAlias, some of these
migrations take a long time.  The total set of migrations are expected to have
a runtime on the order of 2 hours.
 - Legacy-Id: 16237
2019-06-10 11:32:46 +00:00
Robert Sparks ae70706faf Converted the community app tests to use factories. Commit ready for merge.
- Legacy-Id: 15314
2018-07-12 05:56:14 +00:00
Henrik Levkowetz 76628be3fd Merged in ^/branch/iola/author-stats-r13145 from olau@iola.dk, and fixed some tests in code which moved after the latest merge with trunk. The test suite passes, but the migrations are _not_ ready to run, because of numbering conflicts (again due to code changes on trunk since the latest sync).
- Legacy-Id: 13479
2017-05-31 20:59:26 +00:00
Henrik Levkowetz 6bdf6ffd9b Changed some tests to use unicontent(r) instead of r.content, which decodes non-ascii content according to the response charset.
- Legacy-Id: 13189
2017-04-10 22:25:43 +00:00
Ole Laursen 5b677dc6ba Merge author stats branch into new branch from trunk
- Legacy-Id: 13159
2017-03-28 14:36:40 +00:00
Lars Eggert 8a70e9773d Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Ole Laursen 9308948195 Add person, affiliation and country (through django-countries) to
DocumentAuthor, rename author field to email and make it optional (for
modeling old email-less submissions), remove the authors many to many
referencing field from Document as it is not really pointing the right
place.

Update the Secretariat tools to show affiliation and country.

Add migration for getting rid of the fake email addresses that the
migration script created some years ago (just set the author email
field to null).
 - Legacy-Id: 12739
2017-01-26 17:10:08 +00:00
Robert Sparks e0ea8b0f57 Added programs to the datatracker. Added use of restructuredtext for group about pages. Generalized several places where code handles different group types. Improved testing of group about. Commit ready for merge.
- Legacy-Id: 12722
2017-01-24 19:55:49 +00:00
Ole Laursen b6d4c5ffe8 Drop naming community URL patterns, just reverse them directly from
the view
 - Legacy-Id: 11175
2016-05-06 18:10:37 +00:00
Ole Laursen c7589f9b6a Integrate community lists for groups with the existing group documents
page. Each WG/RG now gets a list with an initial set of rules to
populate the list.

Refine the community list management interface a bit to support the
group lists better - group lists aren't connected to the usual track
icons so need to be able to add/remove individual drafts.

Change the "name contains" rule to support regular expressions to
enable each group to have a default replacement for the previously
implemented "related documents" search. Maintain a materialized view
of the regexp-matched drafts with a call in the submit code to avoid
having to scan all drafts/~1000 group rules all the time.
 - Legacy-Id: 10963
2016-03-22 12:48:44 +00:00
Ole Laursen cdcad43fc0 Simplify community lists further by letting email subscriptions reuse
the existing infrastructure for accounts and emails, instead of a
having a separate confirmation step
 - Legacy-Id: 10951
2016-03-17 12:02:45 +00:00
Ole Laursen 5f4082d595 Overhaul of the community list code.
From a user perspective: Use friendlier URLs for lists. Reuse the
search results table for displaying lists. Simplify the management
pages and improve the search rule UI to help fill in the values and
validating them, instead of just providing a text field. Fixes #1874.
Add an explicit button for adding individual documents. Include all
changes in the document change streams, not just some changes. Fix a
concurrency issue that allows changed documents to escape the search
rules. Don't create an empty list just be logging in.

From a code maintenance perspective: Clean up the models. Replace the
background caching scheme with direct queries. Get rid of a big chunk
of code. Speed up the code that adds track buttons to search results.
Add tests of all community views. Fixes #1422. Also fix some minor
bugs and oddities here and there.

There's still some work to do with respect to integrating the group
lists better.
 - Legacy-Id: 10921
2016-03-14 10:44:57 +00:00
Ole Laursen cd5c60ccf1 Clean up permission checking in community lists, fix split in
track/untrack between personal/group lists, get rid of remove_document
 - Legacy-Id: 10680
2016-01-13 17:37:22 +00:00
Ole Laursen e807115e81 Fix community list track/untrack to use POST rather than GET
- Legacy-Id: 10660
2016-01-13 10:15:38 +00:00