1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Swap transactions and initialization over to modern status constants

Summary: Ref T2543. Update these for the modern stuff.

Test Plan: Created a new revision, got a revision in the right state ("Needs Review"). Accepted, planned, requested, abandoned revision; state transitions looked good.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2543

Differential Revision: https://secure.phabricator.com/D18415
This commit is contained in:
epriestley 2017-08-11 15:49:05 -07:00
parent 895f0cde1f
commit cd15c2d545
7 changed files with 13 additions and 10 deletions

View file

@ -72,7 +72,7 @@ final class DifferentialRevision extends DifferentialDAO
->attachRepository(null)
->attachActiveDiff(null)
->attachReviewers(array())
->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW);
->setModernRevisionStatus(DifferentialRevisionStatus::NEEDS_REVIEW);
}
protected function getConfiguration() {

View file

@ -47,7 +47,8 @@ final class DifferentialRevisionAbandonTransaction
}
public function applyInternalEffects($object, $value) {
$object->setStatus(ArcanistDifferentialRevisionStatus::ABANDONED);
$status_abandoned = DifferentialRevisionStatus::ABANDONED;
$object->setModernRevisionStatus($status_abandoned);
}
protected function validateAction($object, PhabricatorUser $viewer) {

View file

@ -37,8 +37,8 @@ final class DifferentialRevisionCloseTransaction
public function applyInternalEffects($object, $value) {
$was_accepted = $object->isAccepted();
$status_closed = ArcanistDifferentialRevisionStatus::CLOSED;
$object->setStatus($status_closed);
$status_published = DifferentialRevisionStatus::PUBLISHED;
$object->setModernRevisionStatus($status_published);
$object->setProperty(
DifferentialRevision::PROPERTY_CLOSED_FROM_ACCEPTED,

View file

@ -50,8 +50,8 @@ final class DifferentialRevisionPlanChangesTransaction
}
public function applyInternalEffects($object, $value) {
$status_planned = ArcanistDifferentialRevisionStatus::CHANGES_PLANNED;
$object->setStatus($status_planned);
$status_planned = DifferentialRevisionStatus::CHANGES_PLANNED;
$object->setModernRevisionStatus($status_planned);
}
protected function validateAction($object, PhabricatorUser $viewer) {

View file

@ -47,7 +47,8 @@ final class DifferentialRevisionReclaimTransaction
}
public function applyInternalEffects($object, $value) {
$object->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW);
$status_review = DifferentialRevisionStatus::NEEDS_REVIEW;
$object->setModernRevisionStatus($status_review);
}
protected function validateAction($object, PhabricatorUser $viewer) {

View file

@ -35,7 +35,8 @@ final class DifferentialRevisionReopenTransaction
}
public function applyInternalEffects($object, $value) {
$object->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW);
$status_review = DifferentialRevisionStatus::NEEDS_REVIEW;
$object->setModernRevisionStatus($status_review);
}
protected function validateAction($object, PhabricatorUser $viewer) {

View file

@ -31,8 +31,8 @@ final class DifferentialRevisionRequestReviewTransaction
}
public function applyInternalEffects($object, $value) {
$status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW;
$object->setStatus($status_review);
$status_review = DifferentialRevisionStatus::NEEDS_REVIEW;
$object->setModernRevisionStatus($status_review);
}
protected function validateAction($object, PhabricatorUser $viewer) {