Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14648187
D19022.id45617.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
D19022.id45617.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
@@ -632,6 +632,8 @@
}
protected function getMailTo(PhabricatorLiskDAO $object) {
+ $this->requireReviewers($object);
+
$phids = array();
$phids[] = $object->getAuthorPHID();
foreach ($object->getReviewers() as $reviewer) {
@@ -645,6 +647,8 @@
}
protected function newMailUnexpandablePHIDs(PhabricatorLiskDAO $object) {
+ $this->requireReviewers($object);
+
$phids = array();
foreach ($object->getReviewers() as $reviewer) {
@@ -1737,4 +1741,25 @@
}
}
+ private function requireReviewers(DifferentialRevision $revision) {
+ if ($revision->hasAttachedReviewers()) {
+ return;
+ }
+
+ $with_reviewers = id(new DifferentialRevisionQuery())
+ ->setViewer($this->getActor())
+ ->needReviewers(true)
+ ->withPHIDs(array($revision->getPHID()))
+ ->executeOne();
+ if (!$with_reviewers) {
+ throw new Exception(
+ pht(
+ 'Failed to reload revision ("%s").',
+ $revision->getPHID()));
+ }
+
+ $revision->attachReviewers($with_reviewers->getReviewers());
+ }
+
+
}
diff --git a/src/applications/differential/storage/DifferentialRevision.php b/src/applications/differential/storage/DifferentialRevision.php
--- a/src/applications/differential/storage/DifferentialRevision.php
+++ b/src/applications/differential/storage/DifferentialRevision.php
@@ -583,6 +583,10 @@
return $this;
}
+ public function hasAttachedReviewers() {
+ return ($this->reviewerStatus !== self::ATTACHABLE);
+ }
+
public function getReviewerPHIDs() {
$reviewers = $this->getReviewers();
return mpull($reviewers, 'getReviewerPHID');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 2:02 PM (13 h, 24 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6987158
Default Alt Text
D19022.id45617.diff (1 KB)
Attached To
Mode
D19022: Fix an issue where some Differential edit pathways may not have reviewers attached
Attached
Detach File
Event Timeline
Log In to Comment