mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +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:
parent
895f0cde1f
commit
cd15c2d545
7 changed files with 13 additions and 10 deletions
|
@ -72,7 +72,7 @@ final class DifferentialRevision extends DifferentialDAO
|
||||||
->attachRepository(null)
|
->attachRepository(null)
|
||||||
->attachActiveDiff(null)
|
->attachActiveDiff(null)
|
||||||
->attachReviewers(array())
|
->attachReviewers(array())
|
||||||
->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW);
|
->setModernRevisionStatus(DifferentialRevisionStatus::NEEDS_REVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getConfiguration() {
|
protected function getConfiguration() {
|
||||||
|
|
|
@ -47,7 +47,8 @@ final class DifferentialRevisionAbandonTransaction
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyInternalEffects($object, $value) {
|
public function applyInternalEffects($object, $value) {
|
||||||
$object->setStatus(ArcanistDifferentialRevisionStatus::ABANDONED);
|
$status_abandoned = DifferentialRevisionStatus::ABANDONED;
|
||||||
|
$object->setModernRevisionStatus($status_abandoned);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function validateAction($object, PhabricatorUser $viewer) {
|
protected function validateAction($object, PhabricatorUser $viewer) {
|
||||||
|
|
|
@ -37,8 +37,8 @@ final class DifferentialRevisionCloseTransaction
|
||||||
public function applyInternalEffects($object, $value) {
|
public function applyInternalEffects($object, $value) {
|
||||||
$was_accepted = $object->isAccepted();
|
$was_accepted = $object->isAccepted();
|
||||||
|
|
||||||
$status_closed = ArcanistDifferentialRevisionStatus::CLOSED;
|
$status_published = DifferentialRevisionStatus::PUBLISHED;
|
||||||
$object->setStatus($status_closed);
|
$object->setModernRevisionStatus($status_published);
|
||||||
|
|
||||||
$object->setProperty(
|
$object->setProperty(
|
||||||
DifferentialRevision::PROPERTY_CLOSED_FROM_ACCEPTED,
|
DifferentialRevision::PROPERTY_CLOSED_FROM_ACCEPTED,
|
||||||
|
|
|
@ -50,8 +50,8 @@ final class DifferentialRevisionPlanChangesTransaction
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyInternalEffects($object, $value) {
|
public function applyInternalEffects($object, $value) {
|
||||||
$status_planned = ArcanistDifferentialRevisionStatus::CHANGES_PLANNED;
|
$status_planned = DifferentialRevisionStatus::CHANGES_PLANNED;
|
||||||
$object->setStatus($status_planned);
|
$object->setModernRevisionStatus($status_planned);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function validateAction($object, PhabricatorUser $viewer) {
|
protected function validateAction($object, PhabricatorUser $viewer) {
|
||||||
|
|
|
@ -47,7 +47,8 @@ final class DifferentialRevisionReclaimTransaction
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyInternalEffects($object, $value) {
|
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) {
|
protected function validateAction($object, PhabricatorUser $viewer) {
|
||||||
|
|
|
@ -35,7 +35,8 @@ final class DifferentialRevisionReopenTransaction
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyInternalEffects($object, $value) {
|
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) {
|
protected function validateAction($object, PhabricatorUser $viewer) {
|
||||||
|
|
|
@ -31,8 +31,8 @@ final class DifferentialRevisionRequestReviewTransaction
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyInternalEffects($object, $value) {
|
public function applyInternalEffects($object, $value) {
|
||||||
$status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW;
|
$status_review = DifferentialRevisionStatus::NEEDS_REVIEW;
|
||||||
$object->setStatus($status_review);
|
$object->setModernRevisionStatus($status_review);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function validateAction($object, PhabricatorUser $viewer) {
|
protected function validateAction($object, PhabricatorUser $viewer) {
|
||||||
|
|
Loading…
Reference in a new issue