[WIP] Add archived state to review requests
Review Request #6830 — Created Jan. 25, 2015 and discarded
Orig: January 25, 2015
- added visibility field to ReviewRequestVisit with visible (V) and archived (A) states
- added show_archived attribute to DashboardDataGrid
- added ReviewRequestVisitManagerJanuary 31, 2015
- scrapped ReviewRequestVisitManager idea
- added a query that filters archived requests to ReviewRequestManager
- wrote and applied a evolution for visibility in the ReviewRequestVisit tableFebruary 11, 2015
- added archive and mute buttons in template with handlers
- added a reviewRequestVisit JavaScript resource that talks to the webAPI
- began review_request_visit APIFebruary 13, 2015
- scrapped review_request_visit API and decided on two separate archived_request_visit and muted_request_visit APIs to prevent visits from being exposed
- added archive/unarchive/mute/unmute functions in reviewRequestVisit model
- began archive bannerFebruary 16, 2015
- url() and archive() in archivedReviewRequestModel.js
- added decorators in the archived_review_request webAPI resourceFebruary 17, 2015
- finished implementing query that filters archived review requests
- added more functional hyperlink that toggles review request visibility with url query
- works as it should if there are no other existing url queries, but still need to figure out how to append to existing, non-"show-archived" url queriesFebruary 19, 2015
- fixed archive query
- completed POST request for archiving
- made "Hide" button disappear when review request is already archivedFebruary 28, 2015
Description | From | Last Updated |
---|---|---|
'ConcurrencyManager' imported but unused |
reviewbot | |
undefined name 'ReviewRequestVisit' |
reviewbot | |
The first line of this file should be from __future__ import unicode_literals. With that, you can change initial=u'V' to initial='V'. |
david | |
Col: 80 E501 line too long (109 > 79 characters) |
reviewbot | |
Col: 2 W292 no newline at end of file |
reviewbot | |
You should revert the change to this line. |
david | |
'ReviewRequestVisit' imported but unused |
reviewbot | |
You don't need the '' default in the get statement. It would return a None which would be a false … |
VT VTL-Developer | |
I think that we want this to be a filter on the existing queryset (rather than replacing it entirely). Something … |
david | |
Col: 5 E101 indentation contains mixed spaces and tabs |
reviewbot | |
Col: 5 W191 indentation contains tabs |
reviewbot | |
Col: 6 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
undefined name 'ReviewRequestVisit' |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 61 W292 no newline at end of file |
reviewbot | |
Col: 9 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 33 W291 trailing whitespace |
reviewbot | |
'User' imported but unused |
reviewbot | |
'augment_method_from' imported but unused |
reviewbot | |
'webapi_check_local_site' imported but unused |
reviewbot | |
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
local variable 'user' is assigned to but never used |
reviewbot | |
local variable 'review_request' is assigned to but never used |
reviewbot | |
undefined name 'DOES_NOT_EXIST' |
reviewbot | |
local variable 'user' is assigned to but never used |
reviewbot | |
local variable 'review_request' is assigned to but never used |
reviewbot | |
undefined name 'DOES_NOT_EXIST' |
reviewbot | |
'augment_method_from' imported but unused |
reviewbot | |
'webapi_check_local_site' imported but unused |
reviewbot | |
'resources' imported but unused |
reviewbot | |
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
Col: 9 E128 continuation line under-indented for visual indent |
reviewbot | |
These sorts of methods don't really help that much. It's nicer to just have the calling code set the field … |
david | |
I'd not sure if this is temporary test code or not, but we should just be passing filter_archived as a … |
david | |
This isn't quite right. Please see my earlier suggestion at https://reviews.reviewboard.org/r/6830/#comment20262 In this context, it would end up looking something … |
david | |
'User' imported but unused |
reviewbot | |
'augment_method_from' imported but unused |
reviewbot | |
Col: 60 E231 missing whitespace after ',' |
reviewbot | |
local variable 'user' is assigned to but never used |
reviewbot | |
This should probably be more like: visit, is_new = ReviewRequestVisit.objects.get_or_create( user=user, review_request=review_request) visit.visible = ReviewRequestVisit.ARCHIVED visit.save() |
david | |
undefined name 'archived_review_request' |
reviewbot | |
Col: 26 E225 missing whitespace around operator |
reviewbot | |
Col: 5 W604 backticks are deprecated, use 'repr()' |
reviewbot | |
Col: 7 E226 missing whitespace around arithmetic operator |
reviewbot | |
Col: 1 E112 expected an indented block |
reviewbot | |
Col: 9 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 9 E128 continuation line under-indented for visual indent |
reviewbot | |
This isn't used anymore. |
david | |
Col: 19 E702 multiple statements on one line (semicolon) |
reviewbot | |
Should have the model name before it: "reviewrequestvisit_visibility" I don't see any profile settings in here? |
chipx86 | |
Blank line between these. |
chipx86 | |
Should use one of the constants instead of hard-coding V. I'm not sure we want to index this here. If … |
chipx86 | |
This is already defined in ReviewRequestDataGrid. |
chipx86 | |
I feel like we're doing a bunch of unnecessary work for this 'show_archived' flag. I also think we can't assume … |
chipx86 | |
Best named hidden_q or just queryset. |
chipx86 | |
Instead of the ~Q(...), use Q(visibility__ne=...) |
chipx86 | |
Should use the consatnt instead of "P". |
chipx86 | |
I don't think we need this anymore? |
chipx86 | |
Should be added alphabetically. |
chipx86 | |
Col: 19 E702 multiple statements on one line (semicolon) |
reviewbot | |
'Q' imported but unused |
reviewbot | |
Rather than using a continuation character here, can you put the whole expression in parens? if (review_request.public and review_request.status == … |
david | |
These should probably be defined inside the UserSession object (right after this.watchedGroups = ...). We should also wrap these strings … |
david | |
Same comment as above. |
david | |
Same comment as above. |
david | |
Same comment as above. |
david | |
Same comment as above. |
david | |
Same comment as above. |
david | |
This should say "review request" instead of "change" |
david | |
This should say "review request" instead of "change" |
david | |
No blank line here (django and djblets are both "3rd party" libraries from Review Board's point of view). |
david | |
Can you add docstrings for the class and method? |
david | |
Please add visibility=self.model.ARCHIVED to the filter call (we don't want to update muted review requests). |
david | |
Col: 21 E126 continuation line over-indented for hanging indent |
reviewbot | |
Please add a blank line after the docstring. |
david | |
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
review_published and reply_published pass a Review instance as their argument rather than a ReviewRequest. You'll need a separate handler for … |
david | |
Col: 80 E501 line too long (82 > 79 characters) |
reviewbot | |
Since you have parens, put the opening paren on the previous line instead of using \\ |
david | |
I think djblets.util.http.get_url_params_except will do what you want. |
david | |
Col: 7 E111 indentation is not a multiple of four |
reviewbot | |
Please don't change the signatures of these, and instead have a separate handler. |
david | |
I don't understand what the visibility attribute is used for. Can you explain? |
david | |
Please use "review request" instead of "change" |
david | |
Please use "review request" instead of "change" |
david |
- Description:
-
~ Orig: January 25, 2015
~ Orig: January 25, 2015
+ - added visibility field to ReviewRequestVisit with visible (V) and archived (A) states + - added show_archived attribute to DashboardDataGrid + - added ReviewRequestVisitManager ~ Added visibility field to ReviewRequestVisit and show_archived attribute to DashboardDataGrid
~ January 31, 2015
+ - scrapped ReviewRequestVisitManager idea + - added a query that filters archived requests to ReviewRequestManager + - wrote and applied a evolution for visibility in the ReviewRequestVisit table - Commit:
-
f8c550c5d914b28d0377bdd6377000cac9a846c6acc7bd2e8fcf47ba65e6751ac89be7d76fdc2167
-
Tool: PEP8 Style Checker Processed Files: reviewboard/datagrids/grids.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/models.py reviewboard/reviews/managers.py Tool: Pyflakes Processed Files: reviewboard/datagrids/grids.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/models.py reviewboard/reviews/managers.py
-
-
-
- Groups:
-
-
The first line of this file should be
from __future__ import unicode_literals
. With that, you can changeinitial=u'V'
toinitial='V'
. -
-
I think that we want this to be a filter on the existing queryset (rather than replacing it entirely). Something like this?
if not show_archived: hidden = ReviewRequestVisit.objects.filter( user=user, visibility__ne=ReviewRequestVisit.VISIBLE) hidden = hidden.values_list('review_request_id', flat=True) self.queryset = self.queryset.exclude(pk__in=hidden)
In fact, it might be even more appropriate to plumb the
show_archived
field through and do this at the bottom ofReviewRequestManager._query
, which already has some similar code (which filters out review requests that are "private")
- Change Summary:
-
Create a ReviewRequestVisit resource
- Commit:
-
acc7bd2e8fcf47ba65e6751ac89be7d76fdc2167d761bad5a5db274969e67f4c0e85995403c5a49f
- Diff:
-
Revision 3 (+161 -5)
-
Tool: Pyflakes Processed Files: reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/review_request_visit.py reviewboard/accounts/models.py reviewboard/reviews/managers.py Ignored Files: reviewboard/static/rb/js/resources/models/reviewRequestVisitModel.js reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/views/reviewRequestEditorView.js Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/review_request_visit.py reviewboard/accounts/models.py reviewboard/reviews/managers.py Ignored Files: reviewboard/static/rb/js/resources/models/reviewRequestVisitModel.js reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/views/reviewRequestEditorView.js
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Description:
-
Orig: January 25, 2015
- added visibility field to ReviewRequestVisit with visible (V) and archived (A) states - added show_archived attribute to DashboardDataGrid - added ReviewRequestVisitManager January 31, 2015
- scrapped ReviewRequestVisitManager idea - added a query that filters archived requests to ReviewRequestManager - wrote and applied a evolution for visibility in the ReviewRequestVisit table + + February 11, 2015
+ - added archive and mute buttons in template with handlers + - added a reviewRequestVisit JavaScript resource that talks to the webAPI + - began review_request_visit API + + February 13, 2015
+ - scrapped review_request_visit API and decided on two separate archived_request_visit and muted_request_visit APIs to prevent visits from being exposed + - added archive/unarchive/mute/unmute functions in reviewRequestVisit model + - began archive banner - Commit:
-
d761bad5a5db274969e67f4c0e85995403c5a49fdd41ef4892b29dd572e8a0055eba13103ed9b9e2
- Diff:
-
Revision 4 (+328 -5)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/managers.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/static/rb/js/views/reviewRequestEditorView.js Tool: Pyflakes Processed Files: reviewboard/reviews/managers.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/static/rb/js/views/reviewRequestEditorView.js
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Description:
-
Orig: January 25, 2015
- added visibility field to ReviewRequestVisit with visible (V) and archived (A) states - added show_archived attribute to DashboardDataGrid - added ReviewRequestVisitManager January 31, 2015
- scrapped ReviewRequestVisitManager idea - added a query that filters archived requests to ReviewRequestManager - wrote and applied a evolution for visibility in the ReviewRequestVisit table February 11, 2015
- added archive and mute buttons in template with handlers - added a reviewRequestVisit JavaScript resource that talks to the webAPI - began review_request_visit API February 13, 2015
- scrapped review_request_visit API and decided on two separate archived_request_visit and muted_request_visit APIs to prevent visits from being exposed - added archive/unarchive/mute/unmute functions in reviewRequestVisit model - began archive banner + + February 16, 2015
+ - url() and archive() in archivedReviewRequestModel.js + - added decorators in the archived_review_request webAPI resource - Commit:
-
dd41ef4892b29dd572e8a0055eba13103ed9b9e2ec502e8704937ace2508186aeb29686d8c8a93c4
- Diff:
-
Revision 5 (+338 -5)
-
Tool: Pyflakes Processed Files: reviewboard/reviews/managers.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/static/rb/js/views/reviewRequestEditorView.js Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/managers.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/static/rb/js/views/reviewRequestEditorView.js
-
-
-
-
-
-
-
I haven't looked too much at the javascript code because it looks very preliminary.
I'd suggest setting the archive flag for a review request in the database admin and using that to test that the dashboard queries are working correctly.
-
These sorts of methods don't really help that much. It's nicer to just have the calling code set the field directly and call save() when appropriate.
-
I'd not sure if this is temporary test code or not, but we should just be passing
filter_archived
as a parameter to the existingReviewRequest.objects.*()
methods, rather than replacing the queryset. With this as-is, all the pages of the dashboard will look the same. -
This isn't quite right. Please see my earlier suggestion at https://reviews.reviewboard.org/r/6830/#comment20262
In this context, it would end up looking something like this:
query = self.filter(query).distinct() if filter_archived: hidden = ReviewRequestVisit.objects.filter( user=user, visibility__ne=ReviewRequestVisit.VISIBLE) hidden = hidden.values_list('review_request_id', flat=True) query = query.exclude(pk__in=hidden) if with_counts: ...
-
This should probably be more like:
visit, is_new = ReviewRequestVisit.objects.get_or_create( user=user, review_request=review_request) visit.visible = ReviewRequestVisit.ARCHIVED visit.save()
- Description:
-
Orig: January 25, 2015
- added visibility field to ReviewRequestVisit with visible (V) and archived (A) states - added show_archived attribute to DashboardDataGrid - added ReviewRequestVisitManager January 31, 2015
- scrapped ReviewRequestVisitManager idea - added a query that filters archived requests to ReviewRequestManager - wrote and applied a evolution for visibility in the ReviewRequestVisit table February 11, 2015
- added archive and mute buttons in template with handlers - added a reviewRequestVisit JavaScript resource that talks to the webAPI - began review_request_visit API February 13, 2015
- scrapped review_request_visit API and decided on two separate archived_request_visit and muted_request_visit APIs to prevent visits from being exposed - added archive/unarchive/mute/unmute functions in reviewRequestVisit model - began archive banner February 16, 2015
- url() and archive() in archivedReviewRequestModel.js - added decorators in the archived_review_request webAPI resource + + February 17, 2015
+ - finished implementing query that filters archived review requests + - added more functional hyperlink that toggles review request visibility with url query + - still need to figure out how to append to existing, non-"show-archived" url queries - Commit:
-
ec502e8704937ace2508186aeb29686d8c8a93c415817c2ec1d9510700d4b6db06e70cd9c1078b64
- Diff:
-
Revision 6 (+331 -7)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/evolutions/visibility.py profile_show_archived.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/reviews/managers.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/css/common.less reviewboard/static/rb/js/views/reviewRequestEditorView.js
-
-
-
-
-
- Description:
-
Orig: January 25, 2015
- added visibility field to ReviewRequestVisit with visible (V) and archived (A) states - added show_archived attribute to DashboardDataGrid - added ReviewRequestVisitManager January 31, 2015
- scrapped ReviewRequestVisitManager idea - added a query that filters archived requests to ReviewRequestManager - wrote and applied a evolution for visibility in the ReviewRequestVisit table February 11, 2015
- added archive and mute buttons in template with handlers - added a reviewRequestVisit JavaScript resource that talks to the webAPI - began review_request_visit API February 13, 2015
- scrapped review_request_visit API and decided on two separate archived_request_visit and muted_request_visit APIs to prevent visits from being exposed - added archive/unarchive/mute/unmute functions in reviewRequestVisit model - began archive banner February 16, 2015
- url() and archive() in archivedReviewRequestModel.js - added decorators in the archived_review_request webAPI resource February 17, 2015
- finished implementing query that filters archived review requests - added more functional hyperlink that toggles review request visibility with url query ~ - still need to figure out how to append to existing, non-"show-archived" url queries ~ - works as it should if there are no other existing url queries, but still need to figure out how to append to existing, non-"show-archived" url queries
- Description:
-
Orig: January 25, 2015
- added visibility field to ReviewRequestVisit with visible (V) and archived (A) states - added show_archived attribute to DashboardDataGrid - added ReviewRequestVisitManager January 31, 2015
- scrapped ReviewRequestVisitManager idea - added a query that filters archived requests to ReviewRequestManager - wrote and applied a evolution for visibility in the ReviewRequestVisit table February 11, 2015
- added archive and mute buttons in template with handlers - added a reviewRequestVisit JavaScript resource that talks to the webAPI - began review_request_visit API February 13, 2015
- scrapped review_request_visit API and decided on two separate archived_request_visit and muted_request_visit APIs to prevent visits from being exposed - added archive/unarchive/mute/unmute functions in reviewRequestVisit model - began archive banner February 16, 2015
- url() and archive() in archivedReviewRequestModel.js - added decorators in the archived_review_request webAPI resource February 17, 2015
- finished implementing query that filters archived review requests - added more functional hyperlink that toggles review request visibility with url query - works as it should if there are no other existing url queries, but still need to figure out how to append to existing, non-"show-archived" url queries + + February 19, 2015
+ - fixed archive query + - completed POST request for archiving + - made "Hide" button disappear when review request is already archived - Commit:
-
15817c2ec1d9510700d4b6db06e70cd9c1078b6400a52a262629140a2a129c64195079dab47d350d
- Diff:
-
Revision 7 (+322 -7)
-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/css/common.less reviewboard/static/rb/js/views/reviewRequestEditorView.js Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/css/common.less reviewboard/static/rb/js/views/reviewRequestEditorView.js
-
- Change Summary:
-
- added the archive banner
- half-way through unarchiving
- Description:
-
Orig: January 25, 2015
- added visibility field to ReviewRequestVisit with visible (V) and archived (A) states - added show_archived attribute to DashboardDataGrid - added ReviewRequestVisitManager January 31, 2015
- scrapped ReviewRequestVisitManager idea - added a query that filters archived requests to ReviewRequestManager - wrote and applied a evolution for visibility in the ReviewRequestVisit table February 11, 2015
- added archive and mute buttons in template with handlers - added a reviewRequestVisit JavaScript resource that talks to the webAPI - began review_request_visit API February 13, 2015
- scrapped review_request_visit API and decided on two separate archived_request_visit and muted_request_visit APIs to prevent visits from being exposed - added archive/unarchive/mute/unmute functions in reviewRequestVisit model - began archive banner February 16, 2015
- url() and archive() in archivedReviewRequestModel.js - added decorators in the archived_review_request webAPI resource February 17, 2015
- finished implementing query that filters archived review requests - added more functional hyperlink that toggles review request visibility with url query - works as it should if there are no other existing url queries, but still need to figure out how to append to existing, non-"show-archived" url queries February 19, 2015
- fixed archive query - completed POST request for archiving - made "Hide" button disappear when review request is already archived + + February 28, 2015
- Commit:
-
00a52a262629140a2a129c64195079dab47d350d0efec0f2ca7bfc80777956ace53bf5509c324cb1
- Diff:
-
Revision 8 (+350 -22)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/templates/reviews/review_header.html reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/templates/reviews/review_header.html reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js
-
- Commit:
-
0efec0f2ca7bfc80777956ace53bf5509c324cb1368a6e448f4ca03712cfe8d5d0f53925f24cb916
- Diff:
-
Revision 9 (+377 -39)
-
Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/base.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/baseResourceModel.js reviewboard/static/rb/js/models/userSessionModel.js
-
-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/accounts/evolutions/visibility.py reviewboard/accounts/evolutions/__init__.py reviewboard/datagrids/grids.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/models.py reviewboard/staticbundles.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/templates/base.html reviewboard/static/rb/js/resources/models/archivedReviewRequestModel.js reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/resources/models/baseResourceModel.js reviewboard/static/rb/js/models/userSessionModel.js
-
-
Should have the model name before it: "reviewrequestvisit_visibility"
I don't see any profile settings in here?
-
-
Should use one of the constants instead of hard-coding
V
.I'm not sure we want to index this here. If there's 500 archived review requests, then the index will contain 500 entries under 'A', which isn't that useful. The user's own archived ones will still need to be searched within that 500.
If we want to index something, it's probably best to do an
index_together = ('user', 'visibility')
. -
-
I feel like we're doing a bunch of unnecessary work for this 'show_archived' flag. I also think we can't assume that
profile
is defined here yet. Also, we need to record whether we've changed a profile setting.How about we instead do:
profile_changed = False ... default_show_archived = (profile and profile.extra_data.get('show_archived', False)) try: self.show_archived = ... except ValueError: self.show_archived = default_show_archived ... if profile and self.show_archived != default_show_archived: profile.extra_data[...] = ... profile_changed = True parent_profile_changed = super(...).load_extra_state(...) return profile_changed or parent_profile_changed
-
-
-
-
-
- Change Summary:
-
- finished banners
- implemented automatic refreshing
- finished unarchiving
- finished all of muting and unmuting
- Commit:
-
368a6e448f4ca03712cfe8d5d0f53925f24cb9163ba7d6d3bb8df2c25aa1678aab9053ad30c7850b
- Diff:
-
Revision 10 (+453 -49)
-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/webapi/resources/muted_review_request.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/datagrids/grids.py reviewboard/accounts/models.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/static/rb/js/resources/models/reviewGroupModel.js reviewboard/templates/base.html reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/css/pages/reviews.less reviewboard/static/rb/js/resources/models/reviewRequestModel.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/webapi/resources/muted_review_request.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/datagrids/grids.py reviewboard/accounts/models.py reviewboard/webapi/resources/user.py reviewboard/webapi/resources/archived_review_request.py Ignored Files: reviewboard/static/rb/js/resources/models/reviewGroupModel.js reviewboard/templates/base.html reviewboard/templates/reviews/review_header.html reviewboard/templates/reviews/reviewable_page_data.js reviewboard/static/rb/js/views/reviewRequestEditorView.js reviewboard/static/rb/css/pages/reviews.less reviewboard/static/rb/js/resources/models/reviewRequestModel.js reviewboard/static/rb/css/common.less reviewboard/templates/reviews/review_request_actions_secondary.html reviewboard/static/rb/js/models/userSessionModel.js
-
-
This is getting to be a pretty big change. How would you feel about splitting this up into several review requests? One to add the database stuff, one for the dashboard queries, one to add API, and one for frontend?
-
Rather than using a continuation character here, can you put the whole expression in parens?
if (review_request.public and review_request.status == review_request.PENDING_REVIEW):
-
These should probably be defined inside the UserSession object (right after
this.watchedGroups = ...
). We should also wrap these strings ingettext()
. -
-
-
-
-
-
-
- Change Summary:
-
- signals for automatic unarchiving
- fixed url query
- Commit:
-
3ba7d6d3bb8df2c25aa1678aab9053ad30c7850b49668b4aea5e044641aa81265b7e76c809c9f066
- Diff:
-
Revision 11 (+518 -61)
-
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
-
-
-
-
-
-
No blank line here (django and djblets are both "3rd party" libraries from Review Board's point of view).
-
-
Please add
visibility=self.model.ARCHIVED
to the filter call (we don't want to update muted review requests). -
-
review_published
andreply_published
pass a Review instance as their argument rather than a ReviewRequest. You'll need a separate handler for those signals which accessesreview.review_request
-
-
-
-
-
-