From e91d72fefbf995423e8dad3131cdb679b88fcee3 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 6 Sep 2017 09:25:31 -0700 Subject: [PATCH] Un-hide the "X added reviewers: ..." transactions in revision creation mail Summary: Fixes T12118. See PHI54. This adds a special case for the initial "reviewers" transactions, similar to the existing special case for "projects" transactions. Although these transactions are redudnant in the web view since you can see the information clearly on the page, they're more reasonably useful in mail. Test Plan: {F5168838} Reviewers: chad Reviewed By: chad Maniphest Tasks: T12118 Differential Revision: https://secure.phabricator.com/D18542 --- .../differential/storage/DifferentialTransaction.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/applications/differential/storage/DifferentialTransaction.php b/src/applications/differential/storage/DifferentialTransaction.php index 1cd1f2b062..ea0d7789cb 100644 --- a/src/applications/differential/storage/DifferentialTransaction.php +++ b/src/applications/differential/storage/DifferentialTransaction.php @@ -105,6 +105,18 @@ final class DifferentialTransaction return parent::shouldHide(); } + public function shouldHideForMail(array $xactions) { + switch ($this->getTransactionType()) { + case DifferentialRevisionReviewersTransaction::TRANSACTIONTYPE: + // Don't hide the initial "X added reviewers: ..." transaction during + // object creation from mail. See T12118 and PHI54. + return false; + } + + return parent::shouldHideForMail($xactions); + } + + public function isInlineCommentTransaction() { switch ($this->getTransactionType()) { case self::TYPE_INLINE: