mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-25 15:00:58 +01:00
Put revisions waiting on other reviewers in their own bucket
Summary: Fixes T12323. See that task for discussion. Test Plan: {F3424441} Reviewers: chad Reviewed By: chad Maniphest Tasks: T12323 Differential Revision: https://secure.phabricator.com/D17425
This commit is contained in:
parent
c5fa7421c2
commit
6c21646b5f
1 changed files with 26 additions and 0 deletions
|
@ -63,6 +63,11 @@ final class DifferentialRevisionRequiredActionResultBucket
|
||||||
->setNoDataString(pht('No revisions are waiting on author action.'))
|
->setNoDataString(pht('No revisions are waiting on author action.'))
|
||||||
->setObjects($this->filterWaitingOnAuthors($phids));
|
->setObjects($this->filterWaitingOnAuthors($phids));
|
||||||
|
|
||||||
|
$groups[] = $this->newGroup()
|
||||||
|
->setName(pht('Waiting on Other Reviewers'))
|
||||||
|
->setNoDataString(pht('No revisions are waiting for other reviewers.'))
|
||||||
|
->setObjects($this->filterWaitingOnOtherReviewers($phids));
|
||||||
|
|
||||||
// Because you can apply these buckets to queries which include revisions
|
// Because you can apply these buckets to queries which include revisions
|
||||||
// that have been closed, add an "Other" bucket if we still have stuff
|
// that have been closed, add an "Other" bucket if we still have stuff
|
||||||
// that didn't get filtered into any of the previous buckets.
|
// that didn't get filtered into any of the previous buckets.
|
||||||
|
@ -203,4 +208,25 @@ final class DifferentialRevisionRequiredActionResultBucket
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function filterWaitingOnOtherReviewers(array $phids) {
|
||||||
|
$statuses = array(
|
||||||
|
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW,
|
||||||
|
);
|
||||||
|
$statuses = array_fuse($statuses);
|
||||||
|
|
||||||
|
$objects = $this->getRevisionsNotAuthored($this->objects, $phids);
|
||||||
|
|
||||||
|
$results = array();
|
||||||
|
foreach ($objects as $key => $object) {
|
||||||
|
if (!isset($statuses[$object->getStatus()])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$results[$key] = $object;
|
||||||
|
unset($this->objects[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue