• 
      

    Bug Fix for Issue #1075

    Review Request #4578 — Created Sept. 17, 2013 and submitted

    Information

    Review Board
    master

    Reviewers

    Issue:Include submitted review requests in the "Starred Reviews" page in the dashboard.

    While users can star submitted reviews, they do not appear in the "Starred Reviews" page of the dashboard. To fix this, I modified DashboardDataGrid to include submitted reviews when it displays the starred reviews, by filtering all public starred reviews. Also, we need to keep the counts for starred reviews consistent, so in accounts.Profile, I included ReviewRequest.SUBMITTED when we star or unstar a review request.

    Manual testing: starred and unstarred a combination of submitted and non-submitted reviews to see if they would be displayed properly on the dashboard.

    Description From Last Updated

    Alignment is a little funky here. Please indent it like this: if (review_request.public and (review_request.status == ReviewRequest.PENDING_REVIEW or review_request.status == …

    daviddavid

    Same here w/ alignment.

    daviddavid

    Please revert these changes.

    daviddavid

    This changes the query in bad ways: * It skips the check that adds users' un-published review requests * You've …

    daviddavid

    Col: 38 W291 trailing whitespace

    reviewbotreviewbot

    Col: 62 E202 whitespace before ')'

    reviewbotreviewbot

    Col: 63 W291 trailing whitespace

    reviewbotreviewbot
    LE
    david
    1. 
        
    2. reviewboard/accounts/models.py (Diff revision 1)
       
       
       
       
      Show all issues

      Alignment is a little funky here. Please indent it like this:

      if (review_request.public and
          (review_request.status == ReviewRequest.PENDING_REVIEW or
           review_request.status == ReviewRequest.SUBMITTED)):
          site_profile...
      
    3. reviewboard/accounts/models.py (Diff revision 1)
       
       
       
       
      Show all issues

      Same here w/ alignment.

    4. reviewboard/admin/checks.py (Diff revision 1)
       
       
       
       
       
       
       
       
       
      Show all issues

      Please revert these changes.

    5. reviewboard/reviews/datagrids.py (Diff revision 1)
       
       
       
      Show all issues

      This changes the query in bad ways:
      * It skips the check that adds users' un-published review requests
      * You've removed the local_site restriction

      I think what we want here is something more like this:

      self.queryset = profile.starred_review_requests.public(
          user, local_site=self.local_site, status=None)
      
    6. 
        
    LE
    reviewbot
    1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
      reviewboard/accounts/models.py
      reviewboard/reviews/datagrids.py
      Ignored Files:

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

      Col: 38
      W291 trailing whitespace

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

      Col: 62
      E202 whitespace before ')'

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

      Col: 63
      W291 trailing whitespace

    5. 
        
    reviewbot
    1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
      reviewboard/accounts/models.py
      reviewboard/reviews/datagrids.py
      Ignored Files:

    2. 
        
    LE
    LE
    reviewbot
    1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
      reviewboard/accounts/models.py
      reviewboard/reviews/datagrids.py
      Ignored Files:

    2. 
        
    reviewbot
    1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
      reviewboard/accounts/models.py
      reviewboard/reviews/datagrids.py
      Ignored Files:

    2. 
        
    david
    1. Ship It!

    2. 
        
    LE
    LE
    Review request changed
    Change Summary:

    Wrote bug # on bugs field.

    Bugs: