Allow status updates to be manually run by the review request owner.

Review Request #14445 — Created May 20, 2025 and updated — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

Status updates can be manually run by clicking a "Run" button in the
status update entry on the review request. Review request owners should
be able to click this, but we have a bug where only admins or the owner of
the status update (aka the configured the Review Bot user) can click the
button to trigger a run. This change fixes that by allowing the review
request owner to pass the mutability check for status updates on the
review request.

This change also hides the "Run" button from users who do not have
mutability permissions for the status update.

Unit tests were added for these cases. We also set data on the
StatusUpdatesEntryMixin object and the review_request on the
StatusUpdate in unit tests, which are always set in practice but
weren't needed in our unit tests before this change.

  • Ran unit tests.
  • Ran a manual status update as the review request owner.
  • Ran an automatic status update.
  • Confirmed that the run button didn't appear for non-owners and
    non-admins.
  • Ran multiple status updates for one review request, one manual and
    one automatic.
  • Tested updating a review request and seeing the status updates run
    again.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Allow status updates to be manually run by the review request owner.
Status updates can be manually run by clicking a "Run" button in the status update entry on the review request. Review request owners should be able to click this, but we have a bug where only admins or the owner of the status update (aka the configured the Review Bot user) can click the button to trigger a run. This change fixes that by allowing the review request owner to pass the mutability check for status updates on the review request. This change also hides the "Run" button from users who do not have mutability permissions for the status update. Unit tests were added for these cases. We also set `data` on the `StatusUpdatesEntryMixin` object and the `review_request` on the `StatusUpdate` in unit tests, which are always set in practice but weren't needed in our unit tests before this change.
2c2015e8e2881ca7d0a70e773c307cd5598484fe Michelle Aubin
reviewboard/reviews/detail.py
reviewboard/reviews/models/status_update.py
reviewboard/reviews/tests/test_entries.py
reviewboard/templates/reviews/status_update_summary.html
Loading...