mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +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:
parent
1881ac8ad8
commit
d9aa9eec78
2 changed files with 20 additions and 5 deletions
|
@ -250,11 +250,24 @@ final class ManiphestTransactionEditor extends PhabricatorEditor {
|
|||
->withPHIDs($phids)
|
||||
->execute();
|
||||
|
||||
$view = new ManiphestTransactionDetailView();
|
||||
$view->setTransactionGroup($transactions);
|
||||
$view->setHandles($handles);
|
||||
$view->setAuxiliaryFields($this->auxiliaryFields);
|
||||
list($action, $main_body) = $view->renderForEmail($with_date = false);
|
||||
$main_body = array();
|
||||
foreach ($transactions as $transaction) {
|
||||
$main_body[] = id(clone $transaction->getModernTransaction())
|
||||
->setHandles($handles)
|
||||
->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);
|
||||
|
||||
|
|
|
@ -52,6 +52,8 @@ final class ManiphestTransaction
|
|||
->setCommentPHID($comment->getPHID())
|
||||
->save();
|
||||
|
||||
$this->proxy->attachComment($comment);
|
||||
|
||||
$this->pendingComment = null;
|
||||
}
|
||||
$this->proxy->saveTransaction();
|
||||
|
|
Loading…
Reference in a new issue