Allow users to opt-out of their own updates.

Review Request #6429 — Created Oct. 10, 2014 and submitted

Information

Review Board
master
f616d56...

Reviewers

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 is 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 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 should_send_own_updates method to the User model. This method is
patched on like the other methods in accounts/models.py.

The send_review_email removes the user sending the email from the
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.

Ran evolution successfully.

Unit tests pass.

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).


Description From Last Updated

Col: 80 E501 line too long (81 > 79 characters)

reviewbotreviewbot

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*

dkusdkus

One thing that I'd like to make sure doesn't break is a user assigning a review request to themselves. In …

daviddavid
reviewbot
  1. 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
    
    
  2. Show all issues
    Col: 80
     E501 line too long (81 > 79 characters)
    
  3. 
      
brennie
brennie
reviewbot
  1. 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
    
    
  2. 
      
justy777
  1. I know i'm loving this feature, everything looks neet and tidy.

  2. 
      
dkus
  1. 
      
  2. reviewboard/accounts/models.py (Diff revision 2)
     
     
    Show all issues

    a user*

  3. 
      
AS
  1. 
      
  2. reviewboard/accounts/models.py (Diff revision 2)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    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?

  3. 
      
brennie
reviewbot
  1. 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
    
    
  2. 
      
david
  1. 
      
  2. reviewboard/notifications/email.py (Diff revision 3)
     
     
     
     
     
    Show all issues

    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.

  3. 
      
brennie
reviewbot
  1. 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
    
    
  2. 
      
brennie
david
  1. Ship It!

  2. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (baa89ce)