Add a new batch operation view

Review Request #12695 — Created Oct. 20, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

For upcoming feature work, we want the ability to make a single request
to publish a bunch of individual items (review requests and reviews) all
together.

To do this, we're introducing a new API-like endpoint for performing
batch operations. This doesn't exist in the official API because it
doesn't really mesh well with REST, and the actual endpoint may be in
flux for a bit.

We already have some batch-like operations in the dashboard UI that
currently just make a whole bunch of API requests for closing review
requests or changing visibility state. This new endpoint will also
enable these workflows, so we can handle it much more efficiently.

The new batch endpoint supports these operations:

  • close
  • discard
  • archive
  • mute
  • unarchive (effectively unmute too)
  • publish
  • Looked at e-mail previews for batch publishes with all combinations of
    review requests, review request updates, reviews, and review replies in
    both HTML and text mode.
  • Used all operations except for publish from real UI.
  • Ran unit tests.

Diff Revision 4

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

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

Commits

First Last Summary ID Author
[WIP] Add a new batch operation view
For upcoming feature work, we want the ability to make a single request to publish a bunch of individual items (review requests and reviews) all together. To do this, we're introducing a new API-like endpoint for performing batch operations. This doesn't exist in the official API because it doesn't really mesh well with REST, and the actual endpoint may be in flux for a bit. We already have some batch-like operations in the dashboard UI that currently just make a whole bunch of API requests for closing review requests or changing visibility state. This new endpoint will also enable these workflows, so we can handle it much more efficiently. This is now mostly complete, and just needs a lot more testing. Testing Done: Ran new unit tests.
3bb11bb0631834e35be316e4a522af561bbeaab4 David Trowbridge
reviewboard/notifications/email/message.py
reviewboard/reviews/urls.py
reviewboard/reviews/models/review.py
reviewboard/reviews/models/review_request.py
reviewboard/reviews/models/review_request_draft.py
reviewboard/reviews/tests/test_batch_view.py
reviewboard/reviews/views/__init__.py
reviewboard/reviews/views/batch.py
reviewboard/reviews/views/email.py
reviewboard/templates/notifications/batch_publish_email.html
reviewboard/templates/notifications/batch_publish_email.txt
Loading...