1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 04:50:55 +01:00

Fixes T2523 - Comments are being displayed in feed.

Summary:
currently, only comments per se are being displayed. cut after 128 characters (which is the default), means in theory up to 128 newlines ^^

when you for example claim a task with a comment, close it with a comment, or do anything else, it won't be displayed

Test Plan: {F33890}

Reviewers: epriestley, btrahan, hwinkel

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2523

Differential Revision: https://secure.phabricator.com/D5119
This commit is contained in:
Anh Nhan Nguyen 2013-02-26 08:59:26 -08:00 committed by epriestley
parent 34db006c4b
commit 1b8ac077f5

View file

@ -26,6 +26,7 @@ final class PhabricatorFeedStoryManiphest
$action = $data->getValue('action'); $action = $data->getValue('action');
switch ($action) { switch ($action) {
case ManiphestAction::ACTION_CREATE: case ManiphestAction::ACTION_CREATE:
case ManiphestAction::ACTION_COMMENT:
$full_size = true; $full_size = true;
break; break;
default: default:
@ -35,7 +36,20 @@ final class PhabricatorFeedStoryManiphest
if ($full_size) { if ($full_size) {
$view->setImage($this->getHandle($data->getAuthorPHID())->getImageURI()); $view->setImage($this->getHandle($data->getAuthorPHID())->getImageURI());
$content = $this->renderSummary($data->getValue('description'));
switch ($action) {
case ManiphestAction::ACTION_COMMENT:
// I'm just fetching the comments here
// Don't repeat this at home!
$comments = $data->getValue('comments');
$content = $this->renderSummary($comments);
break;
default:
// I think this is just for create
$content = $this->renderSummary($data->getValue('description'));
break;
}
$view->appendChild($content); $view->appendChild($content);
} else { } else {
$view->setOneLineStory(true); $view->setOneLineStory(true);