Transactions - introduce a buildTransactionTimeline function
Summary: ...way way down in PhabricatorController. Use it on ManiphestTaskDetailController to test it. Ref T4712. I think the pager logic to be added as part of T4712 can safely reside entirely within this method. As I said earlier, 5 parameters is a lot, so I don't really want to add more. Next diff would do the pagination logic and the diff after that would deploy it everywhere. If while deploying it everywhere I find something off, that will be a different diff. Test Plan: viewed maniphest tasks and they looked as spiffy as ever. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T4712 Differential Revision: https://secure.phabricator.com/D10844
This commit is contained in:
@@ -37,12 +37,6 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
||||
->executeOne();
|
||||
}
|
||||
|
||||
$transactions = id(new ManiphestTransactionQuery())
|
||||
->setViewer($user)
|
||||
->withObjectPHIDs(array($task->getPHID()))
|
||||
->needComments(true)
|
||||
->execute();
|
||||
|
||||
$field_list = PhabricatorCustomField::getObjectFields(
|
||||
$task,
|
||||
PhabricatorCustomField::ROLE_VIEW);
|
||||
@@ -136,15 +130,11 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
||||
$engine = new PhabricatorMarkupEngine();
|
||||
$engine->setViewer($user);
|
||||
$engine->addObject($task, ManiphestTask::MARKUP_FIELD_DESCRIPTION);
|
||||
foreach ($transactions as $modern_xaction) {
|
||||
if ($modern_xaction->getComment()) {
|
||||
$engine->addObject(
|
||||
$modern_xaction->getComment(),
|
||||
PhabricatorApplicationTransactionComment::MARKUP_FIELD_COMMENT);
|
||||
}
|
||||
}
|
||||
|
||||
$engine->process();
|
||||
$timeline = $this->buildTransactionTimeline(
|
||||
$task,
|
||||
new ManiphestTransactionQuery(),
|
||||
$engine);
|
||||
|
||||
$resolution_types = ManiphestTaskStatus::getTaskStatusMap();
|
||||
|
||||
@@ -337,12 +327,6 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
||||
'aphront-panel-preview-loading-text',
|
||||
pht('Loading preview...'))));
|
||||
|
||||
$timeline = id(new PhabricatorApplicationTransactionView())
|
||||
->setUser($user)
|
||||
->setObjectPHID($task->getPHID())
|
||||
->setTransactions($transactions)
|
||||
->setMarkupEngine($engine);
|
||||
|
||||
$object_name = 'T'.$task->getID();
|
||||
$actions = $this->buildActionView($task);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user