mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
Fix two minor points UI issues
Summary: Ref T4427. - When points are configured, show them on the task detail page (just a simple property, at least for now). - Typecast points better to avoid "joe changed points from 12 to 12." beacuse we compare the stored value (as a string) to the new value (as a double). Test Plan: - Saw points on detail view. - Created task with points, then edited it without touching points. No more spurious "changed from 12 to 12" transaction. Reviewers: chad Reviewed By: chad Maniphest Tasks: T4427 Differential Revision: https://secure.phabricator.com/D15223
This commit is contained in:
parent
4c1140a3a7
commit
aa6c993848
2 changed files with 14 additions and 1 deletions
|
@ -229,6 +229,15 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
||||||
|
|
||||||
$view->addProperty(pht('Author'), $author);
|
$view->addProperty(pht('Author'), $author);
|
||||||
|
|
||||||
|
if (ManiphestTaskPoints::getIsEnabled()) {
|
||||||
|
$points = $task->getPoints();
|
||||||
|
if ($points !== null) {
|
||||||
|
$view->addProperty(
|
||||||
|
ManiphestTaskPoints::getPointsLabel(),
|
||||||
|
$task->getPoints());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$source = $task->getOriginalEmailSource();
|
$source = $task->getOriginalEmailSource();
|
||||||
if ($source) {
|
if ($source) {
|
||||||
$subject = '[T'.$task->getID().'] '.$task->getTitle();
|
$subject = '[T'.$task->getID().'] '.$task->getTitle();
|
||||||
|
|
|
@ -71,7 +71,11 @@ final class ManiphestTransactionEditor
|
||||||
case ManiphestTransaction::TYPE_COVER_IMAGE:
|
case ManiphestTransaction::TYPE_COVER_IMAGE:
|
||||||
return $object->getCoverImageFilePHID();
|
return $object->getCoverImageFilePHID();
|
||||||
case ManiphestTransaction::TYPE_POINTS:
|
case ManiphestTransaction::TYPE_POINTS:
|
||||||
return $object->getPoints();
|
$points = $object->getPoints();
|
||||||
|
if ($points !== null) {
|
||||||
|
$points = (double)$points;
|
||||||
|
}
|
||||||
|
return $points;
|
||||||
case ManiphestTransaction::TYPE_MERGED_INTO:
|
case ManiphestTransaction::TYPE_MERGED_INTO:
|
||||||
case ManiphestTransaction::TYPE_MERGED_FROM:
|
case ManiphestTransaction::TYPE_MERGED_FROM:
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue