From 1b8ac077f589730f2628b3638a8641ceac1bfac9 Mon Sep 17 00:00:00 2001 From: Anh Nhan Nguyen Date: Tue, 26 Feb 2013 08:59:26 -0800 Subject: [PATCH] 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 --- .../feed/story/PhabricatorFeedStoryManiphest.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/applications/feed/story/PhabricatorFeedStoryManiphest.php b/src/applications/feed/story/PhabricatorFeedStoryManiphest.php index 9f4fc2c23c..6b094669d0 100644 --- a/src/applications/feed/story/PhabricatorFeedStoryManiphest.php +++ b/src/applications/feed/story/PhabricatorFeedStoryManiphest.php @@ -26,6 +26,7 @@ final class PhabricatorFeedStoryManiphest $action = $data->getValue('action'); switch ($action) { case ManiphestAction::ACTION_CREATE: + case ManiphestAction::ACTION_COMMENT: $full_size = true; break; default: @@ -35,7 +36,20 @@ final class PhabricatorFeedStoryManiphest if ($full_size) { $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); } else { $view->setOneLineStory(true);