Add a Dashboard toggle to show or hide archived review requests
Review Request #7109 — Created March 24, 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-archivedquery is appended to the existing URL query
show-archived=0filters the archived review requests (those that are archived or muted)
show-archived=1includes all review requests, regardless of their state of visibility
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=0and reappeared when setting
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=1. Also tested for a different user who had not archived any of the same review requests. All tests passed.