From 97e7ef0f015c082d40c654154cd453abb81db760 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 26 Nov 2018 06:00:59 -0800 Subject: [PATCH] When the last rejecting reviewer resigns from a revision, return it to "Needs Review" Summary: Ref T13216. Fixes T12920. See PHI911. If you reject a revision and then resign from it, it stays in "Needs Revision". There's some arguable motivation for this, but it's inconsistent with how "Accept" works (if the last accepting reviewer resigns, we kick you out of "Accepted"). Make it consistent. Test Plan: - As the only reviewer: requested changes to a revision, then resigned. - Before: revision stays in "Needs Revision". - After: revision moves back to "Needs Review". Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13216, T12920 Differential Revision: https://secure.phabricator.com/D19840 --- .../differential/editor/DifferentialTransactionEditor.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php index 5bc33dabe1..7fa4cd61e2 100644 --- a/src/applications/differential/editor/DifferentialTransactionEditor.php +++ b/src/applications/differential/editor/DifferentialTransactionEditor.php @@ -451,6 +451,11 @@ final class DifferentialTransactionEditor // conditions for acceptance. This usually happens after an accepting // reviewer resigns or is removed. $new_status = DifferentialRevisionStatus::NEEDS_REVIEW; + } else if ($was_revision) { + // This revision was "Needs Revision", but no longer has any rejecting + // reviewers. This usually happens after the last rejecting reviewer + // resigns or is removed. Put the revision back in "Needs Review". + $new_status = DifferentialRevisionStatus::NEEDS_REVIEW; } if ($new_status === null) {