From 64cf9204c1d9495a9a896fae563edf2a34675710 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 2 Nov 2016 13:09:08 -0700 Subject: [PATCH] In Calendar, only include the event description in the original event mail Summary: Ref T11809. This makes the mail more consistent with Differential and Maniphest, which only include additional details in the first mail in the thread. Test Plan: - Created an event with a description. - First mail included it. - Followups did not. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11809 Differential Revision: https://secure.phabricator.com/D16794 --- .../editor/PhabricatorCalendarEventEditor.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php b/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php index 12f7b8ba8d..b0cb844e9a 100644 --- a/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php +++ b/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php @@ -304,28 +304,31 @@ final class PhabricatorCalendarEventEditor protected function buildMailTemplate(PhabricatorLiskDAO $object) { $id = $object->getID(); $name = $object->getName(); + $monogram = $object->getMonogram(); return id(new PhabricatorMetaMTAMail()) - ->setSubject("E{$id}: {$name}") - ->addHeader('Thread-Topic', "E{$id}: ".$object->getName()); + ->setSubject("{$monogram}: {$name}") + ->addHeader('Thread-Topic', $monogram); } protected function buildMailBody( PhabricatorLiskDAO $object, array $xactions) { - $description = $object->getDescription(); $body = parent::buildMailBody($object, $xactions); - if (strlen($description)) { - $body->addRemarkupSection( - pht('EVENT DESCRIPTION'), - $description); + $description = $object->getDescription(); + if ($this->getIsNewObject()) { + if (strlen($description)) { + $body->addRemarkupSection( + pht('EVENT DESCRIPTION'), + $description); + } } $body->addLinkSection( pht('EVENT DETAIL'), - PhabricatorEnv::getProductionURI('/E'.$object->getID())); + PhabricatorEnv::getProductionURI($object->getURI())); $ics_attachment = $this->newICSAttachment($object); $body->addAttachment($ics_attachment);