@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+13 -3
+13 -3
src/applications/differential/editor/DifferentialTransactionEditor.php
··· 1044 1044 $body = parent::buildMailBody($object, $xactions); 1045 1045 1046 1046 if ($this->getIsNewObject()) { 1047 - $body->addTextSection( 1048 - pht('REVISION SUMMARY'), 1049 - $object->getSummary()); 1047 + $summary = $object->getSummary(); 1048 + if (strlen(trim($summary))) { 1049 + $body->addTextSection( 1050 + pht('REVISION SUMMARY'), 1051 + $summary); 1052 + } 1053 + 1054 + $test_plan = $object->getTestPlan(); 1055 + if (strlen(trim($test_plan))) { 1056 + $body->addTextSection( 1057 + pht('TEST PLAN'), 1058 + $test_plan); 1059 + } 1050 1060 } 1051 1061 1052 1062 $type_inline = DifferentialTransaction::TYPE_INLINE;