mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +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:
parent
425590a03a
commit
6919dddaab
1 changed files with 7 additions and 6 deletions
|
@ -31,9 +31,11 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
||||||
$parent_task = id(new ManiphestTask())->load($workflow);
|
$parent_task = id(new ManiphestTask())->load($workflow);
|
||||||
}
|
}
|
||||||
|
|
||||||
$transactions = ManiphestLegacyTransactionQuery::loadByTask(
|
$transactions = id(new ManiphestTransactionQuery())
|
||||||
$user,
|
->setViewer($user)
|
||||||
$task);
|
->withObjectPHIDs(array($task->getPHID()))
|
||||||
|
->needComments(true)
|
||||||
|
->execute();
|
||||||
|
|
||||||
$field_list = PhabricatorCustomField::getObjectFields(
|
$field_list = PhabricatorCustomField::getObjectFields(
|
||||||
$task,
|
$task,
|
||||||
|
@ -134,8 +136,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
||||||
$engine = new PhabricatorMarkupEngine();
|
$engine = new PhabricatorMarkupEngine();
|
||||||
$engine->setViewer($user);
|
$engine->setViewer($user);
|
||||||
$engine->addObject($task, ManiphestTask::MARKUP_FIELD_DESCRIPTION);
|
$engine->addObject($task, ManiphestTask::MARKUP_FIELD_DESCRIPTION);
|
||||||
foreach ($transactions as $xaction) {
|
foreach ($transactions as $modern_xaction) {
|
||||||
$modern_xaction = $xaction->getModernTransaction();
|
|
||||||
if ($modern_xaction->getComment()) {
|
if ($modern_xaction->getComment()) {
|
||||||
$engine->addObject(
|
$engine->addObject(
|
||||||
$modern_xaction->getComment(),
|
$modern_xaction->getComment(),
|
||||||
|
@ -319,7 +320,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
||||||
$timeline = id(new PhabricatorApplicationTransactionView())
|
$timeline = id(new PhabricatorApplicationTransactionView())
|
||||||
->setUser($user)
|
->setUser($user)
|
||||||
->setObjectPHID($task->getPHID())
|
->setObjectPHID($task->getPHID())
|
||||||
->setTransactions(mpull($transactions, 'getModernTransaction'))
|
->setTransactions($transactions)
|
||||||
->setMarkupEngine($engine);
|
->setMarkupEngine($engine);
|
||||||
|
|
||||||
$object_name = 'T'.$task->getID();
|
$object_name = 'T'.$task->getID();
|
||||||
|
|
Loading…
Reference in a new issue