From 664d9fa3ed4c609458be3c9c1b18192236fa3ae9 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 1 Mar 2017 19:20:24 -0800 Subject: [PATCH] Touch up Badges emails Summary: Ref T12270. Adds the name of the badge to the subject, fixes the double description. Test Plan: Edit lots of badges with and without descriptions, see good emails. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12270 Differential Revision: https://secure.phabricator.com/D17449 --- .../badges/editor/PhabricatorBadgesEditor.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/applications/badges/editor/PhabricatorBadgesEditor.php b/src/applications/badges/editor/PhabricatorBadgesEditor.php index 48057f66e6..a077f4c3ba 100644 --- a/src/applications/badges/editor/PhabricatorBadgesEditor.php +++ b/src/applications/badges/editor/PhabricatorBadgesEditor.php @@ -87,10 +87,12 @@ final class PhabricatorBadgesEditor protected function buildMailTemplate(PhabricatorLiskDAO $object) { $name = $object->getName(); $id = $object->getID(); - $name = pht('Badge %d', $id); + $topic = pht('Badge %d', $id); + $subject = pht('Badge %d: %s', $id, $name); + return id(new PhabricatorMetaMTAMail()) - ->setSubject($name) - ->addHeader('Thread-Topic', $name); + ->setSubject($subject) + ->addHeader('Thread-Topic', $topic); } protected function getMailTo(PhabricatorLiskDAO $object) { @@ -104,15 +106,8 @@ final class PhabricatorBadgesEditor PhabricatorLiskDAO $object, array $xactions) { - $description = $object->getDescription(); $body = parent::buildMailBody($object, $xactions); - if (strlen($description)) { - $body->addRemarkupSection( - pht('BADGE DESCRIPTION'), - $object->getDescription()); - } - $body->addLinkSection( pht('BADGE DETAIL'), PhabricatorEnv::getProductionURI('/badges/view/'.$object->getID().'/'));