Move revisions without reviewers to author's queue
Summary: If the revision doesn't have reviewers then it's really not waiting on someone else and the author must take an action. An improvement would be to check if the reviewers are not disabled but that would require loading their handles. Test Plan: / /differential/ Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin, s.o.butler Differential Revision: https://secure.phabricator.com/D5046
This commit is contained in:
@@ -77,6 +77,7 @@ final class PhabricatorApplicationDifferential extends PhabricatorApplication {
|
||||
$revisions = id(new DifferentialRevisionQuery())
|
||||
->withResponsibleUsers(array($user->getPHID()))
|
||||
->withStatus(DifferentialRevisionQuery::STATUS_OPEN)
|
||||
->needRelationships(true)
|
||||
->execute();
|
||||
|
||||
list($blocking, $active, $waiting) =
|
||||
|
||||
@@ -903,6 +903,9 @@ final class DifferentialRevisionQuery {
|
||||
foreach ($revisions as $revision) {
|
||||
$needs_review = ($revision->getStatus() == $status_review);
|
||||
$filter_is_author = in_array($revision->getAuthorPHID(), $user_phids);
|
||||
if (!$revision->getReviewers()) {
|
||||
$needs_review = false;
|
||||
}
|
||||
|
||||
// If exactly one of "needs review" and "the user is the author" is
|
||||
// true, the user needs to act on it. Otherwise, they're waiting on
|
||||
|
||||
Reference in New Issue
Block a user