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 8

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
71393e085fd0c90ad31dfaac0cc93c90c985041f Kyle McLean
[WIP] First try at optimization of get_last_activity_info
7f0126e01d9bee3253d4432c103e2909e33d4aa9 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
bcdd60cabd6578cee6ff30077e459bc250a65188 Kyle McLean
Fix import error in review_request.py
58b1f375667443f05860b22b5f2afda7123cbd04 Kyle McLean
Fix incorrect argument order
7d9e2b839e96e255740cad767042891a5a4417a9 Kyle McLean
None handling for changedesc
13fb9d7c4f0f91b1998a2d39496ecc1d0b1c2bb8 Kyle McLean
Fetch users in Last Updated By column in one query
c1db2c4bffc2e659dc82a9d89bbf96f4dc7205fe Kyle McLean
Add LastUpdatedByColumnTests based on UsernameColumnTests
8f88d26b9b1c4523a447ac51b7cddb649cd1426b Kyle McLean
Fix ReviewRequest.set_last_activity_info() failing when user is None
e97d9260bcc3a251bd94d65678092dd6d2ed38c2 Kyle McLean
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...