Perform extra cleanup when review request drafts get discarded.

Review Request #13135 — Created July 13, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

This adds a handler for performing extra cleanup when review request drafts
get deleted. Right now the only thing that we do in the handler is delete all
draft file attachments that are being discarded alongside the draft. That
fixes a bug where discarding a review request draft that contained an
update to a file attachment would erase the entire file attachment from the
review request, rather than reverting the file attachment to its previously
published version. It also makes sense to not keep the draft file attachment
around, since it will never be published/accessed again after being discarded.

  • Ran unit tests
  • Made sure that the bug was fixed.

Commits

Files