1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 07:12:41 +01:00

Use ManiphestTransactionQuery in detail view

Summary: Ref T2217. Nuke this legacy callsite.

Test Plan: Loaded a task, looked at it. Looked the same as before.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2217

Differential Revision: https://secure.phabricator.com/D7078
This commit is contained in:
epriestley 2013-09-23 14:31:03 -07:00
parent 425590a03a
commit 6919dddaab

View file

@ -31,9 +31,11 @@ final class ManiphestTaskDetailController extends ManiphestController {
$parent_task = id(new ManiphestTask())->load($workflow);
}
$transactions = ManiphestLegacyTransactionQuery::loadByTask(
$user,
$task);
$transactions = id(new ManiphestTransactionQuery())
->setViewer($user)
->withObjectPHIDs(array($task->getPHID()))
->needComments(true)
->execute();
$field_list = PhabricatorCustomField::getObjectFields(
$task,
@ -134,8 +136,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
$engine = new PhabricatorMarkupEngine();
$engine->setViewer($user);
$engine->addObject($task, ManiphestTask::MARKUP_FIELD_DESCRIPTION);
foreach ($transactions as $xaction) {
$modern_xaction = $xaction->getModernTransaction();
foreach ($transactions as $modern_xaction) {
if ($modern_xaction->getComment()) {
$engine->addObject(
$modern_xaction->getComment(),
@ -319,7 +320,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
$timeline = id(new PhabricatorApplicationTransactionView())
->setUser($user)
->setObjectPHID($task->getPHID())
->setTransactions(mpull($transactions, 'getModernTransaction'))
->setTransactions($transactions)
->setMarkupEngine($engine);
$object_name = 'T'.$task->getID();