1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 02:32:42 +01:00

Route Maniphest email through the transaction core

Summary: Ref T2217. Build transaction details using transaction code.

Test Plan: See screenshot.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2217

Differential Revision: https://secure.phabricator.com/D7074
This commit is contained in:
epriestley 2013-09-23 14:30:20 -07:00
parent 1881ac8ad8
commit d9aa9eec78
2 changed files with 20 additions and 5 deletions

View file

@ -250,11 +250,24 @@ final class ManiphestTransactionEditor extends PhabricatorEditor {
->withPHIDs($phids) ->withPHIDs($phids)
->execute(); ->execute();
$view = new ManiphestTransactionDetailView(); $main_body = array();
$view->setTransactionGroup($transactions); foreach ($transactions as $transaction) {
$view->setHandles($handles); $main_body[] = id(clone $transaction->getModernTransaction())
$view->setAuxiliaryFields($this->auxiliaryFields); ->setHandles($handles)
list($action, $main_body) = $view->renderForEmail($with_date = false); ->setRenderingTarget('text')
->getTitle();
}
foreach ($transactions as $transaction) {
if ($transaction->getComments()) {
$main_body[] = null;
$main_body[] = $transaction->getComments();
}
}
$main_body = implode("\n", $main_body);
$action = head($transactions)->getModernTransaction()->getActionName();
$is_create = $this->isCreate($transactions); $is_create = $this->isCreate($transactions);

View file

@ -52,6 +52,8 @@ final class ManiphestTransaction
->setCommentPHID($comment->getPHID()) ->setCommentPHID($comment->getPHID())
->save(); ->save();
$this->proxy->attachComment($comment);
$this->pendingComment = null; $this->pendingComment = null;
} }
$this->proxy->saveTransaction(); $this->proxy->saveTransaction();