mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +01:00
Use modern revision statuses when bucketing revisions on the Differential dashboard
Summary: Ref T2543. Swaps these over to modern constants. Test Plan: Viewed dashboard, no chagnes to bucketing. Reviewers: chad Reviewed By: chad Maniphest Tasks: T2543 Differential Revision: https://secure.phabricator.com/D18414
This commit is contained in:
parent
7f743c14d5
commit
895f0cde1f
2 changed files with 11 additions and 9 deletions
|
@ -151,9 +151,8 @@ final class DifferentialRevisionRequiredActionResultBucket
|
|||
|
||||
private function filterShouldUpdate(array $phids) {
|
||||
$statuses = array(
|
||||
ArcanistDifferentialRevisionStatus::NEEDS_REVISION,
|
||||
ArcanistDifferentialRevisionStatus::CHANGES_PLANNED,
|
||||
ArcanistDifferentialRevisionStatus::IN_PREPARATION,
|
||||
DifferentialRevisionStatus::NEEDS_REVISION,
|
||||
DifferentialRevisionStatus::CHANGES_PLANNED,
|
||||
);
|
||||
$statuses = array_fuse($statuses);
|
||||
|
||||
|
@ -161,7 +160,7 @@ final class DifferentialRevisionRequiredActionResultBucket
|
|||
|
||||
$results = array();
|
||||
foreach ($objects as $key => $object) {
|
||||
if (empty($statuses[$object->getStatus()])) {
|
||||
if (empty($statuses[$object->getModernRevisionStatus()])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -190,10 +189,9 @@ final class DifferentialRevisionRequiredActionResultBucket
|
|||
|
||||
private function filterWaitingOnAuthors(array $phids) {
|
||||
$statuses = array(
|
||||
ArcanistDifferentialRevisionStatus::ACCEPTED,
|
||||
ArcanistDifferentialRevisionStatus::NEEDS_REVISION,
|
||||
ArcanistDifferentialRevisionStatus::CHANGES_PLANNED,
|
||||
ArcanistDifferentialRevisionStatus::IN_PREPARATION,
|
||||
DifferentialRevisionStatus::ACCEPTED,
|
||||
DifferentialRevisionStatus::NEEDS_REVISION,
|
||||
DifferentialRevisionStatus::CHANGES_PLANNED,
|
||||
);
|
||||
$statuses = array_fuse($statuses);
|
||||
|
||||
|
@ -201,7 +199,7 @@ final class DifferentialRevisionRequiredActionResultBucket
|
|||
|
||||
$results = array();
|
||||
foreach ($objects as $key => $object) {
|
||||
if (empty($statuses[$object->getStatus()])) {
|
||||
if (empty($statuses[$object->getModernRevisionStatus()])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -627,6 +627,10 @@ final class DifferentialRevision extends DifferentialDAO
|
|||
return $this->setStatus($legacy_status);
|
||||
}
|
||||
|
||||
public function getModernRevisionStatus() {
|
||||
return $this->getStatusObject()->getKey();
|
||||
}
|
||||
|
||||
public function isClosed() {
|
||||
return $this->getStatusObject()->isClosedStatus();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue