When a non-broadcasting revision is updated, put it in "Draft", not "Needs Review"
Summary: Depends on D19285. Ref T13110. When you update an "Abandoned + But, Never Promoted" revision or (in the future) a "Changes Planned + But, Never Promoted" revision, return it to the "Draft" state rather than promoting it. Test Plan: Updated an "Abandoned + Draft" revision, saw it return to "Draft". Maniphest Tasks: T13110 Differential Revision: https://secure.phabricator.com/D19286
This commit is contained in:
parent
615d27c8e9
commit
d9bd36039f
|
@ -13,8 +13,14 @@ final class DifferentialRevisionUpdateTransaction
|
||||||
public function applyInternalEffects($object, $value) {
|
public function applyInternalEffects($object, $value) {
|
||||||
$should_review = $this->shouldRequestReviewAfterUpdate($object);
|
$should_review = $this->shouldRequestReviewAfterUpdate($object);
|
||||||
if ($should_review) {
|
if ($should_review) {
|
||||||
$object->setModernRevisionStatus(
|
// If we're updating a non-broadcasting revision, put it back in draft
|
||||||
DifferentialRevisionStatus::NEEDS_REVIEW);
|
// rather than moving it directly to "Needs Review".
|
||||||
|
if ($object->getShouldBroadcast()) {
|
||||||
|
$new_status = DifferentialRevisionStatus::NEEDS_REVIEW;
|
||||||
|
} else {
|
||||||
|
$new_status = DifferentialRevisionStatus::DRAFT;
|
||||||
|
}
|
||||||
|
$object->setModernRevisionStatus($new_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
$editor = $this->getEditor();
|
$editor = $this->getEditor();
|
||||||
|
|
Loading…
Reference in a new issue