Commit graph

33 commits

Author SHA1 Message Date
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
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
Lars Eggert f8b48f4c43
fix: use Internet-Draft more consistently across the UI (#5104)
* s/Internet Draft/Internet-Draft/i

* s/draft/Internet-Draft/i or s/draft/I-D/i

* s/ID/I-D/

* Fix tests

* a -> an

* Undo case-change to ASCII

* Address code review comments

* Add migrations

* Add merged migration

* fix: straighten out migrations

* fix: finish straightening out migrations

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2023-02-11 10:09:28 -06: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
Henrik Levkowetz 9aeda11a29 Removed some Py2 compatibility decorators.
- Legacy-Id: 17673
2020-04-21 13:54:31 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz ea8c84d2f6 Python2/3 compatibility: used @python_2_unicode_compatible to provide __unicode__() versions of __str__() methods.
- Legacy-Id: 16455
2019-07-15 18:01:26 +00:00
Henrik Levkowetz 484dcece5f Changed all model __unicode__() methods to __str__()
- Legacy-Id: 16330
2019-06-28 21:07:08 +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 a4768bb514 Removed unused imports. Added some explicit orderings to avoid pagination issues.
- Legacy-Id: 14664
2018-02-21 23:54:31 +00:00
Henrik Levkowetz 5638cf3da3 Changed all usage of ForeignKey and OneToOneFiled in model.py files to the compatibility versions from ietf.utils.models.
- Legacy-Id: 14661
2018-02-20 15:36: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 aa5e61d958 Updated all urlpatterns to use ietf.utils.urls.url() instead of django's,
in order to autogenerate dotted path url pattern names.  Updated a number
of url reverses to use dotted path, and removed explicit url pattern names
as needed.

Changed some imports to prevent import of ietf.urls before django
initialization was complete.


Changed 3 cases of form classes being curried to functions; django 1.10
didn't accept that.

Started converting old-style middleware classes to new-style middleware
functions (incomplete).

Tweaked a nomcom decorator to preserve function names and attributes, like
a good decorator should.

Replaced the removed django templatetag 'removetags' with our own version
which uses bleach, and does sanitizing in addition to removing explicitly
mentionied html tags.

Rewrote the filename argument handling in a management command which had
broken with the upgrade.
 - Legacy-Id: 12818
2017-02-11 14:43:01 +00:00
Ole Laursen 4c7b2847ba Add a utility function for extracting information about review
requests for a given set of teams/reviewers (making it trivial to
compute statistics), revamp the related doc event code to support this
by referencing the review request directly, add a reviewer overview
page with recent performance for each reviewer as well as
settings/unavailable periods. Fix some bugs and shuffle some of the
review code a bit around.

Finish the importer from the previous Perl-based review tool,
importing log entries, figuring out whether a given review is
early/telechat/last call and fixing corner cases.
 - Legacy-Id: 12080
2016-10-03 15:52:32 +00:00
Ole Laursen 12079a5612 Add SearchRule.__unicode__ for debugging purposes
- Legacy-Id: 11187
2016-05-13 13:22:53 +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 22e2a6a2b8 Delete the DocumentChangeDates model from CommunityList, it's being
used as a cache, but won't be necessary once the display code is
rewritten since it will be able to calculate the data on the fly
 - Legacy-Id: 10682
2016-01-13 18:11:03 +00:00
Ole Laursen 1b8e9eb7e4 Get rid of ExpectedChange model in community lists, it's not used
- Legacy-Id: 10681
2016-01-13 17:43:05 +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 1e75ee3d11 Do not create CommunityLists when rendering the side bar, only render
the links
 - Legacy-Id: 10668
2016-01-13 10:47:36 +00:00
Henrik Levkowetz 342b2d3cb5 Removed the unnecessary get_and_create() of community.model.DisplayConfiguration on community page GET.
- Legacy-Id: 9010
2015-02-06 11:27:50 +00:00
Ole Laursen 7f277a8fbb Replace user.get_profile() with user.person, the profile stuff is deprecated since Django 1.5
- Legacy-Id: 6968
2013-12-18 10:13:40 +00:00
Henrik Levkowetz 907d7b9636 Changed the community tool email notification code to not try to send to nobody, and to use individual To: addressing rather bulk Bcc: addressing.
- Legacy-Id: 5536
2013-03-09 23:04:51 +00:00
Henrik Levkowetz 64c4199877 Unwrap some fairly plain model fields. No code change, just textual.
- Legacy-Id: 5461
2013-02-24 21:20:50 +00:00
Jim Schaad a18bebe7bd Make sure that the same rule cannot be entered twice in a community list.
As part of this fix, you need to do the following:
1.  Eliminate duplicates currently in the data base.  This statement can be used to identify them.

SELECT e1.id id1, e2.id id2, e1.community_list_id, e1.rule_type, e1.value FROM ietf_utf8.community_rule e1 JOIN ietf_utf8.community_rule e2 ON (e1.id != e2.id AND e1.community_list_id=e2.community_list_id AND e1.rule_type=e2.rule_type AND e1.value=e2.value);

2.  Delete any current duplicate lines in the text.  This uses the following commands as of the check-in

DELETE FROM TABLE ietf_utf8.community_rule WHERE id=19 OR id=91 OR id=177

3.  Add a constraint to the table so that it will enforce the rule itself

ALTER TABLE ietf_utf8.community_rule ADD CONSTRAINT pc_CommunityRule UNIQUE (community_list_id, rule_type, value)
 - Legacy-Id: 5426
2013-02-09 18:09:33 +00:00
Henrik Levkowetz 4cb0643c9e Tweaked the community tracker links in the lefthand menubar to avoid line breaking for the WG documents link visible to WG chairs.
- Legacy-Id: 4584
2012-07-04 12:14:37 +00:00
Henrik Levkowetz 71894599bf Tweak the menubar listing of community tracking to show when login is needed, some other text tweaks, and fitting the I-D tracking links under Drafts and RFCs where they seem to belong.
- Legacy-Id: 4568
2012-07-03 13:44:52 +00:00
Henrik Levkowetz fdff56bd21 New schema models have moved from redesign/ to ietf/; fix community sources accordingly.
- Legacy-Id: 4525
2012-06-27 08:44:36 +00:00
Henrik Levkowetz 89ac692442 Added in the community app, which wasn't included properly in the previous commit.
- Legacy-Id: 4519
2012-06-27 08:26:18 +00:00