Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13998471
D17537.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
D17537.diff
View Options
diff --git a/resources/sql/autopatches/20170322.reviewers.04.actor.sql b/resources/sql/autopatches/20170322.reviewers.04.actor.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20170322.reviewers.04.actor.sql
@@ -0,0 +1,2 @@
+ALTER TABLE {$NAMESPACE}_differential.differential_reviewer
+ ADD lastActorPHID VARBINARY(64);
diff --git a/src/applications/differential/storage/DifferentialReviewer.php b/src/applications/differential/storage/DifferentialReviewer.php
--- a/src/applications/differential/storage/DifferentialReviewer.php
+++ b/src/applications/differential/storage/DifferentialReviewer.php
@@ -8,6 +8,7 @@
protected $reviewerStatus;
protected $lastActionDiffPHID;
protected $lastCommentDiffPHID;
+ protected $lastActorPHID;
private $authority = array();
@@ -17,6 +18,7 @@
'reviewerStatus' => 'text64',
'lastActionDiffPHID' => 'phid?',
'lastCommentDiffPHID' => 'phid?',
+ 'lastActorPHID' => 'phid?',
),
self::CONFIG_KEY_SCHEMA => array(
'key_revision' => array(
diff --git a/src/applications/differential/xaction/DifferentialRevisionReviewTransaction.php b/src/applications/differential/xaction/DifferentialRevisionReviewTransaction.php
--- a/src/applications/differential/xaction/DifferentialRevisionReviewTransaction.php
+++ b/src/applications/differential/xaction/DifferentialRevisionReviewTransaction.php
@@ -198,12 +198,17 @@
->setReviewerPHID($dst_phid);
}
+ $old_status = $reviewer->getReviewerStatus();
$reviewer->setReviewerStatus($status);
if ($diff_phid) {
$reviewer->setLastActionDiffPHID($diff_phid);
}
+ if ($old_status !== $status) {
+ $reviewer->setLastActorPHID($this->getActingAsPHID());
+ }
+
try {
$reviewer->save();
} catch (AphrontDuplicateKeyQueryException $ex) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 25, 9:25 AM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6717669
Default Alt Text
D17537.diff (1 KB)
Attached To
Mode
D17537: Record which user accepted on behalf of packages/owners reviewers
Attached
Detach File
Event Timeline
Log In to Comment