• 
      

    Limit e-mail recipients when adding reviewers.

    Review Request #6683 — Created Dec. 8, 2014 and submitted

    Information

    Review Board
    release-2.0.x
    85b83a2...

    Reviewers

    Occasionally, the only change to a review request will be to add additional
    reviewers. This is especially common when a review request is first sent to a
    generic group, and then people in that group make suggestions about who might
    be more appropriate to review the code in question.

    This change makes it so that when the only change to a review request is to
    change the list of reviewers (people or groups), the e-mail that is sent is
    sent only to the author of the review request (assuming that they have "own
    actions" e-mails turned on), people who have starred the review request, and
    the newly-added reviewers. This was requested by a user who has some very
    high-volume e-mail lists, in an effort to cut down on the amount of traffic.

    In the case where the change was to remove reviewers, the e-mail is sent only
    to the author. In the case that the author has "own actions" e-mails turned
    off, no e-mail will be sent.

    Ran unit tests.

    Description From Last Updated

    This can be: recipients.update(limit_recipients_to) We do the for loop and add in lots of places, so I don't mind keeping …

    chipx86chipx86

    Can this be simplified to: if not recipients and not to_field:

    chipx86chipx86

    Missing trailing period.

    chipx86chipx86

    """ on the next line.

    chipx86chipx86

    Same here.

    chipx86chipx86

    And here.

    chipx86chipx86

    Can this be a +=? limit_recipients_to += get_email_addresses_for_group(group)

    chipx86chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/notifications/email.py
          reviewboard/notifications/tests.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/notifications/email.py
          reviewboard/notifications/tests.py
      
      
    2. 
        
    chipx86
    1. 
        
    2. reviewboard/notifications/email.py (Diff revision 1)
       
       
       
      Show all issues

      This can be:

      recipients.update(limit_recipients_to)
      

      We do the for loop and add in lots of places, so I don't mind keeping it how it was for consistency, but this will probably be faster.

    3. reviewboard/notifications/email.py (Diff revision 1)
       
       
      Show all issues

      Can this be simplified to:

      if not recipients and not to_field:
      
    4. reviewboard/notifications/email.py (Diff revision 1)
       
       
      Show all issues

      Missing trailing period.

    5. reviewboard/notifications/tests.py (Diff revision 1)
       
       
      Show all issues

      """ on the next line.

    6. reviewboard/notifications/tests.py (Diff revision 1)
       
       
      Show all issues

      Same here.

    7. reviewboard/notifications/tests.py (Diff revision 1)
       
       
      Show all issues

      And here.

    8. 
        
    david
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/notifications/email.py
          reviewboard/notifications/tests.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/notifications/email.py
          reviewboard/notifications/tests.py
      
      
    2. 
        
    chipx86
    1. 
        
    2. reviewboard/notifications/email.py (Diff revision 2)
       
       
       
      Show all issues

      Can this be a +=?

      limit_recipients_to += get_email_addresses_for_group(group)
      
    3. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (fcf8dcb)