From be0e16ff7d538eefa16baef31ad32e7fe8e01b73 Mon Sep 17 00:00:00 2001 From: Keebuhm Park Date: Fri, 8 Jun 2012 14:30:53 -0700 Subject: [PATCH] Fixed losing full size feed for maniphest task creation Summary: After D2571, feed for maniphest task creation was being generated non-full-size. Fixed this by properly getting the maniphest action from story data. Test Plan: Feed seems to work fine and the feed for task creation is full-sized. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: allenjohnashton, ddfisher, aran, Korvin Differential Revision: https://secure.phabricator.com/D2691 --- .../story/PhabricatorFeedStoryManiphest.php | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/src/applications/feed/story/PhabricatorFeedStoryManiphest.php b/src/applications/feed/story/PhabricatorFeedStoryManiphest.php index bba3fae0e9..b8d6492cfb 100644 --- a/src/applications/feed/story/PhabricatorFeedStoryManiphest.php +++ b/src/applications/feed/story/PhabricatorFeedStoryManiphest.php @@ -40,24 +40,22 @@ final class PhabricatorFeedStoryManiphest $view = new PhabricatorFeedStoryView(); + $line = $this->getLineForData($data); + $view->setTitle($line); $view->setEpoch($data->getEpoch()); - $action = $this->getLineForData($data); - $view->setTitle($action); - $view->setEpoch($data->getEpoch()); - - + $action = $data->getValue('action'); switch ($action) { - case ManiphestAction::ACTION_CREATE: - $full_size = true; - break; - default: - $full_size = false; - break; + case ManiphestAction::ACTION_CREATE: + $full_size = true; + break; + default: + $full_size = false; + break; } if ($full_size) { - $view->setImage($this->getHandle($this->getAuthorPHID())->getImageURI()); + $view->setImage($this->getHandle($data->getAuthorPHID())->getImageURI()); $content = $this->renderSummary($data->getValue('description')); $view->appendChild($content); } else { @@ -67,7 +65,6 @@ final class PhabricatorFeedStoryManiphest return $view; } - public function renderNotificationView() { $data = $this->getStoryData(); @@ -107,13 +104,13 @@ final class PhabricatorFeedStoryManiphest $one_line = "{$actor_link} {$verb} {$task_link}"; switch ($action) { - case ManiphestAction::ACTION_ASSIGN: - case ManiphestAction::ACTION_REASSIGN: - $one_line .= " to {$owner_link}"; - break; - case ManiphestAction::ACTION_DESCRIPTION: - $one_line .= " to {$description}"; - break; + case ManiphestAction::ACTION_ASSIGN: + case ManiphestAction::ACTION_REASSIGN: + $one_line .= " to {$owner_link}"; + break; + case ManiphestAction::ACTION_DESCRIPTION: + $one_line .= " to {$description}"; + break; } if ($comments) {