From dd7087f4db329524d93ab9f5885af68dd74a8199 Mon Sep 17 00:00:00 2001 From: vrana Date: Tue, 17 Apr 2012 00:09:53 -0700 Subject: [PATCH] Don't send empty testplan in e-mail Summary: Allowed after D2193. Test Plan: Disable `differential.require-test-plan-field`, create diff without test plan. Reviewers: epriestley Reviewed By: epriestley CC: aran Differential Revision: https://secure.phabricator.com/D2252 --- .../mail/reviewrequest/DifferentialReviewRequestMail.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/applications/differential/mail/reviewrequest/DifferentialReviewRequestMail.php b/src/applications/differential/mail/reviewrequest/DifferentialReviewRequestMail.php index 3431d7dab4..40cd29fe75 100644 --- a/src/applications/differential/mail/reviewrequest/DifferentialReviewRequestMail.php +++ b/src/applications/differential/mail/reviewrequest/DifferentialReviewRequestMail.php @@ -56,9 +56,11 @@ abstract class DifferentialReviewRequestMail extends DifferentialMail { $body[] = null; } - $body[] = 'TEST PLAN'; - $body[] = $this->formatText($revision->getTestPlan()); - $body[] = null; + if ($revision->getTestPlan() != '') { + $body[] = 'TEST PLAN'; + $body[] = $this->formatText($revision->getTestPlan()); + $body[] = null; + } } else { if (strlen($this->getComments())) { $body[] = $this->formatText($this->getComments());