diff --git a/src/applications/differential/mail/comment/DifferentialCommentMail.php b/src/applications/differential/mail/comment/DifferentialCommentMail.php index 42eb8c7155..060264b166 100644 --- a/src/applications/differential/mail/comment/DifferentialCommentMail.php +++ b/src/applications/differential/mail/comment/DifferentialCommentMail.php @@ -45,9 +45,12 @@ class DifferentialCommentMail extends DifferentialMail { } protected function renderSubject() { + $verb = ucwords($this->getVerb()); $revision = $this->getRevision(); - $verb = $this->getVerb(); - return ucwords($verb).': '.$revision->getTitle(); + $title = $revision->getTitle(); + $id = $revision->getID(); + $subject = "[{$verb}] D{$id}: {$title}"; + return $subject; } protected function getVerb() { diff --git a/src/applications/maniphest/editor/transaction/ManiphestTransactionEditor.php b/src/applications/maniphest/editor/transaction/ManiphestTransactionEditor.php index 8d4ac3430d..ade1eca2f6 100644 --- a/src/applications/maniphest/editor/transaction/ManiphestTransactionEditor.php +++ b/src/applications/maniphest/editor/transaction/ManiphestTransactionEditor.php @@ -17,6 +17,7 @@ */ class ManiphestTransactionEditor { + const SUBJECT_PREFIX = '[Maniphest]'; public function applyTransactions($task, array $transactions) { @@ -174,10 +175,11 @@ class ManiphestTransactionEditor { " ".$task_uri."\n"; $thread_id = 'getPHID().'>'; + $task_id = $task->getID(); + $title = $task->getTitle(); id(new PhabricatorMetaMTAMail()) - ->setSubject( - '[Maniphest] T'.$task->getID().' '.$action.': '.$task->getTitle()) + ->setSubject(self::SUBJECT_PREFIX." [{$action}] T{$task_id}: {$title}") ->setFrom($transaction->getAuthorPHID()) ->addTos($email_to) ->addCCs($email_cc)