-
-
reviewboard/accounts/evolutions/profile_receive_own_updates.py (Diff revision 1) Col: 80 E501 line too long (81 > 79 characters)
Allow users to opt-out of their own updates.
Review Request #6429 — Created Oct. 10, 2014 and submitted
Add
should_send_own_updates
field to Profile model. This field
determines whether or not the user should receive email updates about
their own activity, such as submitting review requests, reviewing
requests, or replying to review requests. The default value for this
field isTrue
.Add an evolution,
profile_should_send_own_updates
, to add the same
field to the Profile model. This evolution sets the value for the
field to the default:True
.Add
should_send_own_updates
field to the Profile settings dialog.
This field is tied to theshould_send_own_updates
field on the
Profile model.Add
should_send_own_updates
method to the User model. This method is
patched on like the other methods inaccounts/models.py
.The
send_review_email
removes the user sending the email from the
set of recipients if they have theirshould_send_own_updates
field
set to False unless they are one of the people assigned to the
people
field of the review request.
Ran evolution successfully.
Unit tests pass.
Tested with local development server. With
should_send_own_updates
set toFalse
, when a review request is created, that user only
receives an email if they are assigned as a reviewer (in thepeople
field, not thegroups
field).
Description | From | Last Updated |
---|---|---|
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
The first function is named _should_send_email() and is about receiving emails. It might be unnecessary, but I think _receive_own_updates() should … |
AS asalahli | |
a user* |
dkus | |
One thing that I'd like to make sure doesn't break is a user assigning a review request to themselves. In … |
david |
Change Summary:
Fix line too long error in evolution.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+41) |
-
Tool: Pyflakes Processed Files: reviewboard/notifications/email.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/models.py reviewboard/accounts/forms/pages.py reviewboard/accounts/evolutions/profile_receive_own_updates.py Tool: PEP8 Style Checker Processed Files: reviewboard/notifications/email.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/models.py reviewboard/accounts/forms/pages.py reviewboard/accounts/evolutions/profile_receive_own_updates.py
-
-
reviewboard/accounts/models.py (Diff revision 2) The first function is named _should_send_email() and is about receiving emails. It might be unnecessary, but I think _receive_own_updates() should be named in a similar fashion?
Change Summary:
Rename
receive_own_updates
->should_send_own_updates
. Fix typo in docstring.
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Commit: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 3 (+41) |
-
Tool: Pyflakes Processed Files: reviewboard/notifications/email.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/profile_should_send_own_updates.py reviewboard/accounts/models.py reviewboard/accounts/forms/pages.py Tool: PEP8 Style Checker Processed Files: reviewboard/notifications/email.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/profile_should_send_own_updates.py reviewboard/accounts/models.py reviewboard/accounts/forms/pages.py
-
-
reviewboard/notifications/email.py (Diff revision 3) One thing that I'd like to make sure doesn't break is a user assigning a review request to themselves. In that case, they should still be listed in the 'to' field.
Change Summary:
If a RR is assigned to the submitter, they still get an email.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+46 -6) |
-
Tool: Pyflakes Processed Files: reviewboard/notifications/email.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/profile_should_send_own_updates.py reviewboard/accounts/models.py reviewboard/accounts/forms/pages.py Tool: PEP8 Style Checker Processed Files: reviewboard/notifications/email.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/profile_should_send_own_updates.py reviewboard/accounts/models.py reviewboard/accounts/forms/pages.py
Change Summary:
Update testing and description.
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|