mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
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:
parent
d643282385
commit
fbd41e4219
2 changed files with 4 additions and 0 deletions
|
@ -77,6 +77,7 @@ final class PhabricatorApplicationDifferential extends PhabricatorApplication {
|
||||||
$revisions = id(new DifferentialRevisionQuery())
|
$revisions = id(new DifferentialRevisionQuery())
|
||||||
->withResponsibleUsers(array($user->getPHID()))
|
->withResponsibleUsers(array($user->getPHID()))
|
||||||
->withStatus(DifferentialRevisionQuery::STATUS_OPEN)
|
->withStatus(DifferentialRevisionQuery::STATUS_OPEN)
|
||||||
|
->needRelationships(true)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
list($blocking, $active, $waiting) =
|
list($blocking, $active, $waiting) =
|
||||||
|
|
|
@ -903,6 +903,9 @@ final class DifferentialRevisionQuery {
|
||||||
foreach ($revisions as $revision) {
|
foreach ($revisions as $revision) {
|
||||||
$needs_review = ($revision->getStatus() == $status_review);
|
$needs_review = ($revision->getStatus() == $status_review);
|
||||||
$filter_is_author = in_array($revision->getAuthorPHID(), $user_phids);
|
$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
|
// 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
|
// true, the user needs to act on it. Otherwise, they're waiting on
|
||||||
|
|
Loading…
Reference in a new issue