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 6

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
62015796cb54bef579f56a6a08bb97239883f4d4 Kyle McLean
[WIP] First try at optimization of get_last_activity_info
84239ac84985eed852ecde343ffc61615a9e8cd7 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
46f16c0bb32a46cc1e4fa7fddb9d1a7c8e8945fb Kyle McLean
Fix import error in review_request.py
0db77dfb14e2e4093e3f9643fc579adacc69ed45 Kyle McLean
Fix incorrect argument order
981da047d01ea23faa3cfadca804b7f48e452689 Kyle McLean
None handling for changedesc
ddf8a9844dc4a2e35d1587b3a475cff2b497dc28 Kyle McLean
Fetch users in Last Updated By column in one query
24b6b3f6c9bcbf7a20712a62330a02f6f53d798e Kyle McLean
reviewboard/datagrids/columns.py
reviewboard/datagrids/grids.py
reviewboard/reviews/models/review.py
reviewboard/reviews/models/review_request.py
reviewboard/reviews/tests/test_review_request.py
Loading...