Provide automatic unarchiving when a user publishes review requests, reviews or review replies
Review Request #7088 — Created March 19, 2015 and submitted
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 |
|
|
|
Col: 1 E302 expected 2 blank lines, found 1 |
|
|
|
Col: 80 E501 line too long (82 > 79 characters) |
|
|
|
Col: 7 E111 indentation is not a multiple of four |
|
|
|
djblets imports go in the same import group as django imports (as they are both considered 3rd party to this … |
|
|
|
(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 |
|
|
|
(from David) Please add a blank line after the docstring. |
CR cristocrat | |
|
"inherits from" |
|
|
|
(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 |
|
|
|
(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 |
|
|
|
(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 |
|
|
|
Col: 1 E302 expected 2 blank lines, found 1 |
|
|
|
Col: 1 E302 expected 2 blank lines, found 1 |
|
|
|
Col: 1 E302 expected 2 blank lines, found 1 |
|
|
|
This must be in the following form: """One-line summary. Multi-line description. """ |
|
|
|
This is hard to read. Best to split it off into two statements: queryset = self.filter(...) queryset.update(...) |
|
|
|
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. … |
|
- Summary:
-
Provide automatic unarchiving when a user publishes review requests, reviews or review replies.[WIP] Provide automatic unarchiving when a user publishes review requests, reviews or review replies.
-
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 -
-
-
-
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 -
-
-
-
- Summary:
-
[WIP] Provide automatic unarchiving when a user publishes review requests, reviews or review replies.Provide automatic unarchiving when a user publishes review requests, reviews or review replies
- Testing Done:
-
+ 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
-
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
-
-
-
This is hard to read. Best to split it off into two statements:
queryset = self.filter(...) queryset.update(...) -
Update these to pass
review.review_request_idandreply.review_request_idto avoid a possible unnecessary fetch of the review request from the database. It will Just Work with theunarchive_all(), since the query being performed accepts either an object or an ID.
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