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:
parent
f29b54944f
commit
84742a94db
1 changed files with 26 additions and 0 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue