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) { private function filterShouldUpdate(array $phids) {
$statuses = array( $statuses = array(
ArcanistDifferentialRevisionStatus::NEEDS_REVISION, DifferentialRevisionStatus::NEEDS_REVISION,
ArcanistDifferentialRevisionStatus::CHANGES_PLANNED, DifferentialRevisionStatus::CHANGES_PLANNED,
ArcanistDifferentialRevisionStatus::IN_PREPARATION,
); );
$statuses = array_fuse($statuses); $statuses = array_fuse($statuses);
@ -161,7 +160,7 @@ final class DifferentialRevisionRequiredActionResultBucket
$results = array(); $results = array();
foreach ($objects as $key => $object) { foreach ($objects as $key => $object) {
if (empty($statuses[$object->getStatus()])) { if (empty($statuses[$object->getModernRevisionStatus()])) {
continue; continue;
} }
@ -190,10 +189,9 @@ final class DifferentialRevisionRequiredActionResultBucket
private function filterWaitingOnAuthors(array $phids) { private function filterWaitingOnAuthors(array $phids) {
$statuses = array( $statuses = array(
ArcanistDifferentialRevisionStatus::ACCEPTED, DifferentialRevisionStatus::ACCEPTED,
ArcanistDifferentialRevisionStatus::NEEDS_REVISION, DifferentialRevisionStatus::NEEDS_REVISION,
ArcanistDifferentialRevisionStatus::CHANGES_PLANNED, DifferentialRevisionStatus::CHANGES_PLANNED,
ArcanistDifferentialRevisionStatus::IN_PREPARATION,
); );
$statuses = array_fuse($statuses); $statuses = array_fuse($statuses);
@ -201,7 +199,7 @@ final class DifferentialRevisionRequiredActionResultBucket
$results = array(); $results = array();
foreach ($objects as $key => $object) { foreach ($objects as $key => $object) {
if (empty($statuses[$object->getStatus()])) { if (empty($statuses[$object->getModernRevisionStatus()])) {
continue; continue;
} }

View file

@ -627,6 +627,10 @@ final class DifferentialRevision extends DifferentialDAO
return $this->setStatus($legacy_status); return $this->setStatus($legacy_status);
} }
public function getModernRevisionStatus() {
return $this->getStatusObject()->getKey();
}
public function isClosed() { public function isClosed() {
return $this->getStatusObject()->isClosedStatus(); return $this->getStatusObject()->isClosedStatus();
} }