mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
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
1 changed files with 8 additions and 2 deletions
|
@ -13,8 +13,14 @@ final class DifferentialRevisionUpdateTransaction
|
|||
public function applyInternalEffects($object, $value) {
|
||||
$should_review = $this->shouldRequestReviewAfterUpdate($object);
|
||||
if ($should_review) {
|
||||
$object->setModernRevisionStatus(
|
||||
DifferentialRevisionStatus::NEEDS_REVIEW);
|
||||
// If we're updating a non-broadcasting revision, put it back in draft
|
||||
// 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();
|
||||
|
|
Loading…
Reference in a new issue