• 
      

    Fix Default reviewers not added to review request for committed change

    Review Request #7691 — Created Oct. 10, 2015 and submitted

    Information

    Review Board
    release-2.0.x

    Reviewers

    Create a review request for a committed change via the "New Review Request" page. Default reviewer is not shown. The season of this bug is because the code of adding default reviewer is only called when posting change via RBtools.
    To solve this, add default reviewers when creating a review request from a committed change

    1. Create a review request from "New Review Request" web UI, the default reviewer was shown.
    2. Run all the unit tests, and pass all the tests.
    Description From Last Updated

    Col: 1 W293 blank line contains whitespace

    reviewbotreviewbot

    Col: 1 W293 blank line contains whitespace

    reviewbotreviewbot

    Col: 77 W291 trailing whitespace

    reviewbotreviewbot

    Undo this change.

    brenniebrennie

    Undo this change.

    brenniebrennie

    Col: 1 W293 blank line contains whitespace

    reviewbotreviewbot

    Col: 1 W293 blank line contains whitespace

    reviewbotreviewbot
    reviewbot
    1. Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/reviews/managers.py
      
      
      
      Tool: Pyflakes
      Processed Files:
          reviewboard/reviews/managers.py
      
      
    2. reviewboard/reviews/managers.py (Diff revision 1)
       
       
      Show all issues
      Col: 1
       W293 blank line contains whitespace
      
    3. reviewboard/reviews/managers.py (Diff revision 1)
       
       
      Show all issues
      Col: 1
       W293 blank line contains whitespace
      
    4. reviewboard/reviews/managers.py (Diff revision 1)
       
       
      Show all issues
      Col: 77
       W291 trailing whitespace
      
    5. 
        
    XU
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/reviews/managers.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/reviews/managers.py
      
      
    2. 
        
    mike_conley
    1. Hey Xutong! Thanks for the patch. Before this can land, we'll probably want a more comprehensive Summary, Description and Testing Done.

      Please see: https://www.reviewboard.org/docs/codebase/dev/writing-good-descriptions/

    2. 
        
    XU
    david
    1. Your summary is much improved but you still need more extensive description and testing done fields. Please also add the bug number into the bugs field.

    2. 
        
    XU
    XU
    XU
    brennie
    1. I have only two minor nitpicks for the code and a few general comments about your description and testing done.

      Your summary doesn't need to mention what files were edited, that's what the diff is for :)
      The description should be a high-level overview of what the issue was and how it was fixed.

      Also, your testing done should describe how you tested the code works, e.g.

      - Ran unit tests
      - Created a post-commit review request and saw that the appropriate default reviewers were added.
      

      You also have some grammar issues in your description and should probably give this a read: https://www.reviewboard.org/docs/codebase/dev/writing-good-descriptions/

    2. reviewboard/reviews/managers.py (Diff revision 2)
       
       
      Show all issues

      Undo this change.

    3. reviewboard/reviews/managers.py (Diff revision 2)
       
       
      Show all issues

      Undo this change.

    4. 
        
    XU
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/reviews/managers.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/reviews/managers.py
      
      
    2. reviewboard/reviews/managers.py (Diff revision 3)
       
       
      Show all issues
      Col: 1
       W293 blank line contains whitespace
      
    3. 
        
    XU
    reviewbot
    1. Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/reviews/managers.py
      
      
      
      Tool: Pyflakes
      Processed Files:
          reviewboard/reviews/managers.py
      
      
    2. reviewboard/reviews/managers.py (Diff revision 4)
       
       
      Show all issues
      Col: 1
       W293 blank line contains whitespace
      
    3. 
        
    XU
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/reviews/managers.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/reviews/managers.py
      
      
    2. 
        
    XU
    XU
    XU
    XU
    david
    1. Your description and testing done are somewhat difficult to follow. I'd suggest being a little less verbose in the description, and making testing done a set of bullet points. For example:

      When creating a review request for a committed change via the "New Review
      Request" page, default reviewers were not added to it. This was happening
      because the code to add those reviewers was only called when posting changes
      from RBTools.
      
      To fix this, in the review request manager, we now explicitly add default
      reviewers when creating a review request from a committed change.
      

      Testing done:
      - Created a new review request from the web UI and saw that default reviewers
        were correctly added.
      - Ran unit tests.
      
    2. 
        
    XU
    XU
    XU
    david
    1. Ship It!
    2. 
        
    XU
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (34dbd74)
    XU
    1. Ship It!
    2.