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 11

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
1b53d5340a46a599c2d22eb0fa9c440d53848c4c Kyle McLean
[WIP] First try at optimization of get_last_activity_info
6fecbb77249f2b9222955ab73179d1fa1e61cf06 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
5e23fb0645c4d5680e8251e164307e700fc04545 Kyle McLean
Fix import error in review_request.py
8453864ec2337dfd1ddd6dd81b60616632a954dc Kyle McLean
Fix incorrect argument order
b8165390960fa8a5505f64a17cc2bac16179dadc Kyle McLean
None handling for changedesc
d1343d9d645200ee6343726f80e582df8acc2522 Kyle McLean
Fetch users in Last Updated By column in one query
3024bc2c126ed04f27863acfd8a29d5b93542544 Kyle McLean
Add LastUpdatedByColumnTests based on UsernameColumnTests
e803fd9d8d43b0df5975ee87eae5a9b0313b0952 Kyle McLean
Fix ReviewRequest.set_last_activity_info() failing when user is None
94152736a6a625bc40f7c33b9e285b8b4039e4ba Kyle McLean
Add info on Last Updated By column to dashboard documentation
818d1b480f7a7eec2732fd85b34ce621c6b895b4 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
f448b444d7d5ef763f763febc926b338f8c6431a Kyle McLean
Handle user being None in ReviewRequest.get_last_activity_user_id()
9efd28e73068f8e72b0a23ee095f359f5ba92c50 Kyle McLean
Make ReviewRequest.publish() set updated_object to diffset if it exists
86f3d157dc1370bc0d65b5077ef61866f18c9a3c Kyle McLean
Update last activity info when review request is reopened
d431747bf9234be4e183845fe9621e4b8450ae2a Kyle McLean
Fix last_updated being set incorrectly after publishing ReviewRequest
8342473afeb4756f0e0d6593b17a0a4400d5e1f0 Kyle McLean
Send the correct user in ReviewRequestLastUpdateResource
d92dc7159c6cf44137a3773cf038c9939eb699c7 Kyle McLean
Fix ReviewRequest.reopen() setting last activity info after no status change
80734ad6b2c671547724941c9357a9c85916701c 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
reviewboard/webapi/resources/review_request_last_update.py
reviewboard/webapi/tests/test_review_request_last_update.py
Loading...