1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 18:22:41 +01:00

Restore missing feed rendering for Maniphest points transactions

Summary: See downstream <https://phabricator.wikimedia.org/T166321>. These got dropped in refactoring, or maybe never existed.

Test Plan: {F4977212}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D18018
This commit is contained in:
epriestley 2017-05-25 13:03:41 -07:00
parent f29b54944f
commit 84742a94db

View file

@ -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();