1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

In Differential mail, hide "summary" if empty and show "test plan" if nonempty

Summary:
Ref T4481. Summary is optional, but we currently always render it.

We previously rendered TEST PLAN. I wanted to see if anyone missed it. I miss it a little bit, and it sounds like @spicyj misses it. Restore it.

Test Plan:
  $ ./bin/mail show-outbound --id 15232
  ...
  BODY
  epriestley created this revision.
  epriestley added reviewers: The Bureaucracy, duck.
  epriestley added a subscriber: duck.

  TEST PLAN
    more j

  REVISION DETAIL
    http://local.aphront.com:8080/D1042

  AFFECTED FILES
    number_j.txt

  CHANGE DETAILS
    Index: number_j.txt
    ===================================================================
    --- number_j.txt
    +++ number_j.txt
    @@ -137,3 +137,4 @@
     j
     j
     j
    +j

  To: epriestley, duck, Sebastiangarcia, Ahmedsmoore, nathanhthomas, chewnicorn
  Cc: duck

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: aran, epriestley, spicyj

Maniphest Tasks: T4481

Differential Revision: https://secure.phabricator.com/D8531
This commit is contained in:
epriestley 2014-03-14 11:53:06 -07:00
parent f54bc8ae58
commit efcca310c2

View file

@ -1044,9 +1044,19 @@ final class DifferentialTransactionEditor
$body = parent::buildMailBody($object, $xactions);
if ($this->getIsNewObject()) {
$summary = $object->getSummary();
if (strlen(trim($summary))) {
$body->addTextSection(
pht('REVISION SUMMARY'),
$object->getSummary());
$summary);
}
$test_plan = $object->getTestPlan();
if (strlen(trim($test_plan))) {
$body->addTextSection(
pht('TEST PLAN'),
$test_plan);
}
}
$type_inline = DifferentialTransaction::TYPE_INLINE;