1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +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:
epriestley 2017-08-11 15:44:51 -07:00
parent 7f743c14d5
commit 895f0cde1f
2 changed files with 11 additions and 9 deletions

View file

@ -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;
}

View file

@ -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();
}