Add a "Last Updated By" column to the dashboard.

Review Request #12018 — Created Jan. 28, 2022 and updated — Latest diff uploaded

Information

Review Board
master

Reviewers

These changes add a new column to the review request dashboard called "Last Updated By" which displays the user that made the last update to each review request. Similar to the existing "Last Updated" column, which shows the time that the last update was made, this column is updated whenever a review request is created, edited, receives a review, is closed, or reopened.

Changes

"Last Updated By" column

  • Added a "Last Updated By" column
  • Added information about the new column to manual
  • Added tests for the new column

ReviewRequest last activity info functions

  • ReviewRequest.get_last_activity_info() also returns the user that last updated the review request
  • Review requests cache their last activity info (last updated object, changedesc, and user) in ReviewRequest.extra_data
  • Added ReviewRequest.set_last_activity_info(timestamp, updated_object, changedesc, user)
  • Modified existing uses of ReviewRequest.get_last_activity_info() to take advantage of the user field
  • Added and modified existing tests of ReviewRequest.get_last_activity_info()

Other

  • Made the WebAPI ReviewRequestLastUpdateResource return the correct user now that ReviewRequest.get_last_activity_info() includes it
  • Added tests for the column itself as well as the new last activity-related functions.
  • Ran all backend tests and observed that all passed.
  • Performed manual testing of the functionality of the column by creating, editing, reviewing, closing, and reopening review requests and observing how the column changes.

Diff Revision 10

This is not the most recent revision of the diff. The latest diff is revision 12. See what's changed.

orig
1
2
3
4
5
6
7
8
9
10
11
12

Commits

First Last Summary ID Author
[WIP] Add a "Last Updated By" column to the dashboard
f7c7567d9f20248d691f65a8e94edd189b1f3200 Kyle McLean
[WIP] First try at optimization of get_last_activity_info
40da9f926ee453e05b0180eca91fe60bf8151de4 Kyle McLean
Continue work on last_activity_info caching
* Update the cache when last activity changes * Add tests for get_last_activity_info * New: update last activity info when closing a review request
be47138600a9f3e1a4a1e18d23a11b209b06e966 Kyle McLean
Fix import error in review_request.py
02e15a8667009fe55e34b6a5aedb89018834ea79 Kyle McLean
Fix incorrect argument order
0b876b73b67af22d4a626a55ebd87bc49075901b Kyle McLean
None handling for changedesc
15e9bde5ab377603c975258f1a886bf216973375 Kyle McLean
Fetch users in Last Updated By column in one query
7e1408701ae874c3431ca3c197141ea6b43825a9 Kyle McLean
Add LastUpdatedByColumnTests based on UsernameColumnTests
8544cae54cebf3d0f3ddced2278089ec4ee289d6 Kyle McLean
Fix ReviewRequest.set_last_activity_info() failing when user is None
abd7f7822a3c75fcd41a9530308e2e64d085cf21 Kyle McLean
Add info on Last Updated By column to dashboard documentation
9295795a19b1c7231bf9c17f5c50badf2f0df1b3 Kyle McLean
Fix issues with review request closing updating last activity info
- Make closing a review request use the same timestamp for last_updated and the ChangeDescription - Fix test_get_last_activity_info_close
d18bc17ba4262150c34d046d0ff2ab690a7231dc Kyle McLean
docs/manual/users/dashboard/index.rst
reviewboard/datagrids/columns.py
reviewboard/datagrids/grids.py
reviewboard/datagrids/tests.py
reviewboard/reviews/models/review.py
reviewboard/reviews/models/review_request.py
reviewboard/reviews/tests/test_review_request.py
Loading...