mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
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
This commit is contained in:
parent
d90a6cfbd1
commit
be0e16ff7d
1 changed files with 17 additions and 20 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue