From 84742a94db1301a80534fa0d90abb3464cb57aae Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 25 May 2017 13:03:41 -0700 Subject: [PATCH] Restore missing feed rendering for Maniphest points transactions Summary: See downstream . These got dropped in refactoring, or maybe never existed. Test Plan: {F4977212} Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D18018 --- .../ManiphestTaskPointsTransaction.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php b/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php index 6d8548fdb4..b1c20af9e6 100644 --- a/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php +++ b/src/applications/maniphest/xaction/ManiphestTaskPointsTransaction.php @@ -50,6 +50,32 @@ final class ManiphestTaskPointsTransaction } } + public function getTitleForFeed() { + $old = $this->getOldValue(); + $new = $this->getNewValue(); + + if ($old === null) { + return pht( + '%s set the point value for %s to %s.', + $this->renderAuthor(), + $this->renderObject(), + $this->renderNewValue()); + } else if ($new === null) { + return pht( + '%s removed the point value for %s.', + $this->renderAuthor(), + $this->renderObject()); + } else { + return pht( + '%s changed the point value for %s from %s to %s.', + $this->renderAuthor(), + $this->renderObject(), + $this->renderOldValue(), + $this->renderNewValue()); + } + } + + public function validateTransactions($object, array $xactions) { $errors = array();