Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14760671
D17605.id42347.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17605.id42347.diff
View Options
diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php
--- a/src/applications/differential/editor/DifferentialTransactionEditor.php
+++ b/src/applications/differential/editor/DifferentialTransactionEditor.php
@@ -339,12 +339,22 @@
}
}
- if ($downgrade_accepts || $downgrade_rejects) {
+ $downgrade = array();
+ if ($downgrade_accepts) {
+ $downgrade[] = DifferentialReviewerStatus::STATUS_ACCEPTED;
+ }
+
+ if ($downgrade_accepts) {
+ $downgrade[] = DifferentialReviewerStatus::STATUS_REJECTED;
+ }
+
+ if ($downgrade) {
$void_type = DifferentialRevisionVoidTransaction::TRANSACTIONTYPE;
+
$results[] = id(new DifferentialTransaction())
->setTransactionType($void_type)
->setIgnoreOnNoEffect(true)
- ->setNewValue(true);
+ ->setNewValue($downgrade);
}
$is_commandeer = false;
diff --git a/src/applications/differential/xaction/DifferentialRevisionVoidTransaction.php b/src/applications/differential/xaction/DifferentialRevisionVoidTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionVoidTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionVoidTransaction.php
@@ -28,7 +28,7 @@
AND reviewerStatus IN (%Ls)',
$table_name,
$object->getPHID(),
- $this->getVoidableStatuses());
+ $value);
return ipull($rows, 'reviewerPHID');
}
@@ -47,11 +47,11 @@
'UPDATE %T SET voidedPHID = %s
WHERE revisionPHID = %s
AND voidedPHID IS NULL
- AND reviewerStatus IN (%Ls)',
+ AND reviewerPHID IN (%Ls)',
$table_name,
$this->getActingAsPHID(),
$object->getPHID(),
- $this->getVoidableStatuses());
+ $value);
}
public function shouldHide() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 23, 7:47 PM (15 h, 51 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7037861
Default Alt Text
D17605.id42347.diff (1 KB)
Attached To
Mode
D17605: Don't downgrade accepts on update (fix "sticky accept")
Attached
Detach File
Event Timeline
Log In to Comment