Fix the close-submitted hook to work with un-published review requests.

Review Request #7071 — Created March 17, 2015 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
52f4794...

Reviewers

The recent fix to disallow closing review requests as "submitted" before they
were ever published wasn't coexisting well with the close-submitted webhooks.
In the case where a user put the review request ID in for something that hadn't
been published, the webhook would throw a 500 error and e-mail the admins.

This change adds a step to publish the review request first before closing.
This ensures that any draft fields get copied over to the review request, and
that all the counters are correct.

Added a new unit test which failed before the change and succeeds after.

    Loading...