Add a Dashboard toggle to show or hide archived review requests
Review Request #7109 — Created March 23, 2015 and submitted — Latest diff uploaded
This adds a toggle on the Dashboard datagrid to show or hide archived review requests, similar to that of the All Review Requests datagrid for showing and hiding closed review requests.
- a new template block is loaded in the dashboard to expose the toggle button
- when the pressed, a
show-archived
query is appended to the existing URL query show-archived=0
filters the archived review requests (those that are archived or muted)show-archived=1
includes all review requests, regardless of their state of visibility
NB: When show-archived
is not specified, its default value of is 0.
Manual tests: Archived and muted several review requests. In the dashboard, they disappeared when setting
show-archived=0
and reappeared when settingshow-archived=1
Unit tests: Added to reviewboard.datagrids.tests to test if archived review requests would appear in the datagrid for a particular user for
show-archived=0
andshow-archived=1
. Also tested for a different user who had not archived any of the same review requests. All tests passed.