diff --git a/src/applications/differential/mail/base/DifferentialMail.php b/src/applications/differential/mail/base/DifferentialMail.php index 9694306ef7..bd5721b391 100644 --- a/src/applications/differential/mail/base/DifferentialMail.php +++ b/src/applications/differential/mail/base/DifferentialMail.php @@ -354,6 +354,11 @@ EOTEXT; return $this->changesets; } + protected function getManiphestTaskPHIDs() { + return $this->getRevision()->getAttachedPHIDs( + PhabricatorPHIDConstants::PHID_TYPE_TASK); + } + public function setInlineComments(array $inline_comments) { assert_instances_of($inline_comments, 'PhabricatorInlineCommentInterface'); $this->inlineComments = $inline_comments; diff --git a/src/applications/differential/mail/reviewrequest/DifferentialReviewRequestMail.php b/src/applications/differential/mail/reviewrequest/DifferentialReviewRequestMail.php index 40cd29fe75..878140b09b 100644 --- a/src/applications/differential/mail/reviewrequest/DifferentialReviewRequestMail.php +++ b/src/applications/differential/mail/reviewrequest/DifferentialReviewRequestMail.php @@ -71,6 +71,17 @@ abstract class DifferentialReviewRequestMail extends DifferentialMail { $body[] = $this->renderRevisionDetailLink(); $body[] = null; + $task_phids = $this->getManiphestTaskPHIDs(); + if ($task_phids) { + $handles = id(new PhabricatorObjectHandleData($task_phids)) + ->loadHandles(); + $body[] = 'MANIPHEST TASKS'; + foreach ($handles as $handle) { + $body[] = ' '.PhabricatorEnv::getProductionURI($handle->getURI()); + } + $body[] = null; + } + $changesets = $this->getChangesets(); if ($changesets) { $body[] = 'AFFECTED FILES';