From 3d2c6f1ed27d976080d18eeedff9f9fec23f252f Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 25 May 2015 05:34:41 -0700 Subject: [PATCH] Make "Tags" and "Branches" custom fields work properly in Diffusion Summary: Ref T8295 (vaguely related). This old method has no callsites. Test Plan: Generated mail, saw "Tags" and "Branches". Reviewers: fabe, joshuaspence Reviewed By: fabe, joshuaspence Subscribers: epriestley Maniphest Tasks: T8295 Differential Revision: https://secure.phabricator.com/D13000 --- .../PhabricatorCommitBranchesField.php | 9 +++++---- .../customfield/PhabricatorCommitTagsField.php | 9 +++++---- .../customfield/field/PhabricatorCustomField.php | 16 ---------------- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/src/applications/repository/customfield/PhabricatorCommitBranchesField.php b/src/applications/repository/customfield/PhabricatorCommitBranchesField.php index ed07a8fb29..c72c51715e 100644 --- a/src/applications/repository/customfield/PhabricatorCommitBranchesField.php +++ b/src/applications/repository/customfield/PhabricatorCommitBranchesField.php @@ -7,13 +7,14 @@ final class PhabricatorCommitBranchesField return 'diffusion:branches'; } - public function shouldAppearInApplicationTransactions() { + public function shouldAppearInTransactionMail() { return true; } - public function buildApplicationTransactionMailBody( - PhabricatorApplicationTransaction $xaction, - PhabricatorMetaMTAMailBody $body) { + public function updateTransactionMailBody( + PhabricatorMetaMTAMailBody $body, + PhabricatorApplicationTransactionEditor $editor, + array $xactions) { $params = array( 'contains' => $this->getObject()->getCommitIdentifier(), diff --git a/src/applications/repository/customfield/PhabricatorCommitTagsField.php b/src/applications/repository/customfield/PhabricatorCommitTagsField.php index 25b2a4ee4e..1220f6be63 100644 --- a/src/applications/repository/customfield/PhabricatorCommitTagsField.php +++ b/src/applications/repository/customfield/PhabricatorCommitTagsField.php @@ -7,13 +7,14 @@ final class PhabricatorCommitTagsField return 'diffusion:tags'; } - public function shouldAppearInApplicationTransactions() { + public function shouldAppearInTransactionMail() { return true; } - public function buildApplicationTransactionMailBody( - PhabricatorApplicationTransaction $xaction, - PhabricatorMetaMTAMailBody $body) { + public function updateTransactionMailBody( + PhabricatorMetaMTAMailBody $body, + PhabricatorApplicationTransactionEditor $editor, + array $xactions) { $params = array( 'commit' => $this->getObject()->getCommitIdentifier(), diff --git a/src/infrastructure/customfield/field/PhabricatorCustomField.php b/src/infrastructure/customfield/field/PhabricatorCustomField.php index 28110e7334..a844ac7735 100644 --- a/src/infrastructure/customfield/field/PhabricatorCustomField.php +++ b/src/infrastructure/customfield/field/PhabricatorCustomField.php @@ -1055,22 +1055,6 @@ abstract class PhabricatorCustomField { return false; } - /** - * TODO: this is only used by Diffusion right now and everything is completely - * faked since Diffusion doesn't use ApplicationTransactions yet. This should - * get fleshed out as we have more use cases. - * - * @task appxaction - */ - public function buildApplicationTransactionMailBody( - PhabricatorApplicationTransaction $xaction, - PhabricatorMetaMTAMailBody $body) { - if ($this->proxy) { - return $this->proxy->buildApplicationTransactionMailBody($xaction, $body); - } - return; - } - /* -( Transaction Mail )--------------------------------------------------- */