Provide automatic unarchiving when a user publishes review requests, reviews or review replies

Review Request #7088 — Created March 19, 2015 and submitted

Information

Review Board
master
9d47c54...

Reviewers

Added automatic unarchiving.

A review request becomes unarchived when a user publishes a new review request, a review or a review reply.

Manual testing:

  • archived review requests become unarchived when there is new activity
  • visible and muted review requests remain muted when there is new activity
  • "new activity" = when a user (not necessarily the "archiver") publishes a draft, review or reply for the review request in question
Description From Last Updated

Col: 21 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

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

reviewbotreviewbot

Col: 7 E111 indentation is not a multiple of four

reviewbotreviewbot

djblets imports go in the same import group as django imports (as they are both considered 3rd party to this …

brenniebrennie

(from David) Can you add docstrings for the class and method?

CR cristocrat

(from David) Please add visibility=self.model.ARCHIVED to the filter call (we don't want to update muted review requests).

CR cristocrat

Col: 21 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

(from David) Please add a blank line after the docstring.

CR cristocrat

"inherits from"

brenniebrennie

(from David) review_published and reply_published pass a Review instance as their argument rather than a ReviewRequest. You'll need a separate …

CR cristocrat

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

(from David) I think djblets.util.http.get_url_params_except will do what you want.

CR cristocrat

Col: 7 E111 indentation is not a multiple of four

reviewbotreviewbot

(from David) Please don't change the signatures of these, and instead have a separate handler.

CR cristocrat

Col: 21 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

This must be in the following form: """One-line summary. Multi-line description. """

chipx86chipx86

This is hard to read. Best to split it off into two statements: queryset = self.filter(...) queryset.update(...)

chipx86chipx86

Update these to pass review.review_request_id and reply.review_request_id to avoid a possible unnecessary fetch of the review request from the database. …

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/datagrids/views.py
        reviewboard/webapi/resources/muted_review_request.py
        reviewboard/datagrids/grids.py
        reviewboard/accounts/evolutions/__init__.py
        reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py
        reviewboard/accounts/managers.py
        reviewboard/accounts/models.py
        reviewboard/webapi/resources/user.py
        reviewboard/webapi/resources/archived_review_request.py
        reviewboard/reviews/signals.py
        reviewboard/reviews/models/review.py
    
    Ignored Files:
        reviewboard/templates/base.html
        reviewboard/templates/reviews/review_header.html
        reviewboard/templates/datagrids/hideable_review_request_listview.html
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/reviews/reviewable_page_data.js
        reviewboard/static/rb/css/common.less
        reviewboard/templates/reviews/review_request_actions_secondary.html
        reviewboard/static/rb/js/models/userSessionModel.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/datagrids/views.py
        reviewboard/webapi/resources/muted_review_request.py
        reviewboard/datagrids/grids.py
        reviewboard/accounts/evolutions/__init__.py
        reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py
        reviewboard/accounts/managers.py
        reviewboard/accounts/models.py
        reviewboard/webapi/resources/user.py
        reviewboard/webapi/resources/archived_review_request.py
        reviewboard/reviews/signals.py
        reviewboard/reviews/models/review.py
    
    Ignored Files:
        reviewboard/templates/base.html
        reviewboard/templates/reviews/review_header.html
        reviewboard/templates/datagrids/hideable_review_request_listview.html
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/reviews/reviewable_page_data.js
        reviewboard/static/rb/css/common.less
        reviewboard/templates/reviews/review_request_actions_secondary.html
        reviewboard/static/rb/js/models/userSessionModel.js
    
    
  2. reviewboard/accounts/managers.py (Diff revision 1)
     
     
    Show all issues
    Col: 21
     E126 continuation line over-indented for hanging indent
    
  3. reviewboard/accounts/models.py (Diff revision 1)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  4. reviewboard/datagrids/grids.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (82 > 79 characters)
    
  5. reviewboard/datagrids/views.py (Diff revision 1)
     
     
    Show all issues
    Col: 7
     E111 indentation is not a multiple of four
    
  6. 
      
CR
CR
CR
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/accounts/managers.py
        reviewboard/datagrids/views.py
        reviewboard/reviews/signals.py
        reviewboard/accounts/models.py
        reviewboard/reviews/models/review.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/accounts/managers.py
        reviewboard/datagrids/views.py
        reviewboard/reviews/signals.py
        reviewboard/accounts/models.py
        reviewboard/reviews/models/review.py
    
    
  2. reviewboard/accounts/managers.py (Diff revision 2)
     
     
    Show all issues
    Col: 21
     E126 continuation line over-indented for hanging indent
    
  3. reviewboard/accounts/models.py (Diff revision 2)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  4. reviewboard/datagrids/views.py (Diff revision 2)
     
     
    Show all issues
    Col: 7
     E111 indentation is not a multiple of four
    
  5. 
      
CR
  1. 
      
  2. reviewboard/accounts/managers.py (Diff revision 2)
     
     
     
    Show all issues

    (from David) Can you add docstrings for the class and method?

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

    (from David) Please add visibility=self.model.ARCHIVED to the filter call (we don't want to update muted review requests).

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

    (from David) Please add a blank line after the docstring.

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

    (from David) review_published and reply_published pass a Review instance as their argument rather than a ReviewRequest. You'll need a separate handler for those signals which accesses review.review_request

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

    (from David) I think djblets.util.http.get_url_params_except will do what you want.

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

    (from David) Please don't change the signatures of these, and instead have a separate handler.

  6. 
      
brennie
  1. 
      
  2. reviewboard/accounts/managers.py (Diff revision 2)
     
     
     
     
    Show all issues

    djblets imports go in the same import group as django imports (as they are both considered 3rd party to this project).

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

    "inherits from"

  4. 
      
CR
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/accounts/managers.py
        reviewboard/accounts/models.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/accounts/managers.py
        reviewboard/accounts/models.py
    
    
  2. reviewboard/accounts/managers.py (Diff revision 3)
     
     
    Show all issues
    Col: 21
     E126 continuation line over-indented for hanging indent
    
  3. reviewboard/accounts/models.py (Diff revision 3)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  4. reviewboard/accounts/models.py (Diff revision 3)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  5. reviewboard/accounts/models.py (Diff revision 3)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  6. 
      
CR
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/accounts/managers.py
        reviewboard/accounts/models.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/accounts/managers.py
        reviewboard/accounts/models.py
    
    
  2. 
      
chipx86
  1. 
      
  2. reviewboard/accounts/managers.py (Diff revision 4)
     
     
     
     
    Show all issues

    This must be in the following form:

    """One-line summary.
    
    Multi-line description.
    """
    
  3. reviewboard/accounts/managers.py (Diff revision 4)
     
     
     
     
    Show all issues

    This is hard to read. Best to split it off into two statements:

    queryset = self.filter(...)
    queryset.update(...)
    
  4. reviewboard/accounts/models.py (Diff revision 4)
     
     
     
     
     
     
     
     
    Show all issues

    Update these to pass review.review_request_id and reply.review_request_id to avoid a possible unnecessary fetch of the review request from the database. It will Just Work with the unarchive_all(), since the query being performed accepts either an object or an ID.

  5. 
      
CR
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/accounts/managers.py
        reviewboard/accounts/models.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/accounts/managers.py
        reviewboard/accounts/models.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
CR
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.5.x (9046dcc)