Page MenuHomePhabricator

D19286.diff
No OneTemporary

D19286.diff

diff --git a/src/applications/differential/xaction/DifferentialRevisionUpdateTransaction.php b/src/applications/differential/xaction/DifferentialRevisionUpdateTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionUpdateTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionUpdateTransaction.php
@@ -13,8 +13,14 @@
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();

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 10:52 PM (20 h, 7 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6796997
Default Alt Text
D19286.diff (1 KB)

Event Timeline