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:
-
a00294c4fdc9f8732828de5498e2a34cc31b7e1c933d3533c99cfc11d1f0ea5c3c358eba26773fce
-
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
- Change Summary:
-
Rename
receive_own_updates
->should_send_own_updates
. Fix typo in docstring. - Description:
-
~ Add
receive_own_updates
field to Profile model. This field~ Add
should_send_own_updates
field to Profile model. This fielddetermines 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 is True
.~ Add an evolution,
receive_own_updates
, to add the same field to the~ Profile model. This evolution sets the value for the field to the ~ default: True
.~ 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
receive_own_updates
field to the Profile settings dialog. This~ field is tied to the receive_own_updates
field on the Profile model.~ Add
should_send_own_updates
field to the Profile settings dialog.~ This field is tied to the should_send_own_updates
field on the+ Profile model. ~ Add
receive_own_updates
method to the User model. This method is~ Add
should_send_own_updates
method to the User model. This method ispatched on like the other methods in accounts/models.py
.The
send_review_email
removes the user sending the email from theset of recipients and to addresses if they have their ~ receive_own_updates
field set to False.~ should_send_own_updates
field set to False. - Testing Done:
-
+ Ran evolution successfully.
+ Unit tests pass.
~ Tested with local development server. When the
receive_own_updates
~ field is set to false, I do not receive emails about my own activity; ~ when it is true, I do receive email. ~ Tested with local development server. When the
~ should_send_own_updates
field is set to False, I do not receive~ emails about my own activity; when it is true, I do receive email. - Commit:
-
933d3533c99cfc11d1f0ea5c3c358eba26773fcef23949b839a2dd64944520635bb9de3d79b12743
-
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:
-
If a RR is assigned to the submitter, they still get an email.
- Commit:
-
f23949b839a2dd64944520635bb9de3d79b12743f616d56d42a4232a8c649a25c3eab1e8797c0e63
-
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:
-
Add
should_send_own_updates
field to Profile model. This fielddetermines 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 is True
.Add an evolution,
profile_should_send_own_updates
, to add the samefield 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 the should_send_own_updates
field on theProfile model. Add
should_send_own_updates
method to the User model. This method ispatched on like the other methods in accounts/models.py
.The
send_review_email
removes the user sending the email from the~ set of recipients and to addresses if they have their ~ should_send_own_updates
field set to False.~ set of recipients if they have their should_send_own_updates
field~ set to False unless they are one of the people assigned to the + people
field of the review request. - Testing Done:
-
Ran evolution successfully.
Unit tests pass.
~ Tested with local development server. When the
~ should_send_own_updates
field is set to False, I do not receive~ emails about my own activity; when it is true, I do receive email. ~ Tested with local development server. With
should_send_own_updates
~ set to False
, when a review request is created, that user only~ receives an email if they are assigned as a reviewer (in the people
+ field, not the groups
field).