Add visibility field to a ReviewRequestVisit
Review Request #7085 — Created March 19, 2015 and submitted
This adds a visibility field to the ReviewRequestVisit with three states: visible (V), archived (A), and muted (M). A database evolution,
reviewrequestvisit_visibility
, is also added.
Added to reviewboard.accounts.tests to test if VISIBLE was the default state of a newly created ReviewRequestVisit, all tests passed.
Checked database entries in the admin interface
Description | From | Last Updated |
---|---|---|
Single quotes for these. |
brennie | |
Can you use tuples here? |
brennie | |
(from David) Since you have parens, put the opening paren on the previous line instead of using \ |
CR cristocrat | |
Judging from previous code, we expect show_archived to be a boolean value. Why are we converting it to an integer … |
brennie | |
We can avoid using a backslash if we format thusly: parent_profile_changed = super(DashboardDataGrid, self).load_extra_state( profile, allow_hide_closed=False) |
brennie | |
Col: 2 W292 no newline at end of file |
reviewbot | |
Blank line after this. |
david | |
local variable 'response' is assigned to but never used |
reviewbot | |
This line can just be: self.client.get(review_request.get_absolute_url()) |
david | |
Col: 1 W293 blank line contains whitespace |
reviewbot | |
Can you alphabetize these imports? |
david | |
Because of the way that test docstrings get used for the test suite output, we don't put periods at the … |
david |
-
-
-
-
Judging from previous code, we expect
show_archived
to be a boolean value. Why are we converting it to an integer and comparing it with zero?Also, we are using
self.show_archived
as a default value forrequest.GET.get
, but in theexcept
block, we havedefault_show_archived
. We should probably usedefault_show_archived
in both situations. -
We can avoid using a backslash if we format thusly:
parent_profile_changed = super(DashboardDataGrid, self).load_extra_state( profile, allow_hide_closed=False)
-
I know it's kind of annoying to swap around, but I don't think the dashboard code should be part of this review request :(
- Summary:
-
Add visibility field to a ReviewRequestVisit database table[WIP] Add visibility field to a ReviewRequestVisit database table.
- Commit:
-
e4f2bdb98eea0e661f48118a4f7e970c410d2b2c4eaa490f6c8ea0becc7e87f09b0d1ad73561c45e
-
Tool: Pyflakes Processed Files: reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/models.py Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/models.py
-
- Summary:
-
[WIP] Add visibility field to a ReviewRequestVisit database table.Add visibility field to a ReviewRequestVisit
- Description:
-
~ The visibility field has three states: visible (V), archived (A), and muted (M). A database evolution, reviewrequestvisit_visibility, was also written for this change.
~ This adds a visibility field to the ReviewRequestVisit with three states: visible (V), archived (A), and muted (M). A database evolution,
reviewrequestvisit_visibility
, is also added.- - Added filtering archived and muted requests in the dashboard
- - Based on the state of the dashboard's show_archived attribute, review requests that are either archived or muted will be filtered from the queryset.
- Testing Done:
-
+ Passed reviewboard.accounts.tests
+ + Checked database entries in the admin interface
- Commit:
-
4eaa490f6c8ea0becc7e87f09b0d1ad73561c45e7b82e700d4cb587b43a1a38ed26510e6382550aa
-
Tool: Pyflakes Processed Files: reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/models.py Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/models.py
- Testing Done:
-
~ Passed reviewboard.accounts.tests
~ Added to reviewboard.accounts.tests to test if VISIBLE was the default state of a newly created ReviewRequestVisit, all tests passed.
Checked database entries in the admin interface
- Commit:
-
7b82e700d4cb587b43a1a38ed26510e6382550aa54fb1c97ee5568e88e7723bc25e3d6a9ed155997
-
Tool: Pyflakes Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/models.py Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/models.py
-
-
Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/models.py Tool: Pyflakes Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/models.py
-
-
Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/models.py Tool: Pyflakes Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/models.py
-
Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/models.py Tool: Pyflakes Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/evolutions/__init__.py reviewboard/accounts/evolutions/reviewrequestvisit_visibility.py reviewboard/accounts/models.py