Differential D7951 Diff 17993 src/applications/project/controller/PhabricatorProjectBoardController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/controller/PhabricatorProjectBoardController.php
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | public function processRequest() { | ||||
$tasks = id(new ManiphestTaskQuery()) | $tasks = id(new ManiphestTaskQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withAllProjects(array($project->getPHID())) | ->withAllProjects(array($project->getPHID())) | ||||
->withStatus(ManiphestTaskQuery::STATUS_OPEN) | ->withStatus(ManiphestTaskQuery::STATUS_OPEN) | ||||
->setOrderBy(ManiphestTaskQuery::ORDER_PRIORITY) | ->setOrderBy(ManiphestTaskQuery::ORDER_PRIORITY) | ||||
->execute(); | ->execute(); | ||||
$tasks = mpull($tasks, null, 'getPHID'); | $tasks = mpull($tasks, null, 'getPHID'); | ||||
if ($tasks) { | |||||
$edge_type = PhabricatorEdgeConfig::TYPE_OBJECT_HAS_COLUMN; | $edge_type = PhabricatorEdgeConfig::TYPE_OBJECT_HAS_COLUMN; | ||||
$edge_query = id(new PhabricatorEdgeQuery()) | $edge_query = id(new PhabricatorEdgeQuery()) | ||||
->withSourcePHIDs(mpull($tasks, 'getPHID')) | ->withSourcePHIDs(mpull($tasks, 'getPHID')) | ||||
->withEdgeTypes(array($edge_type)) | ->withEdgeTypes(array($edge_type)) | ||||
->withDestinationPHIDs(mpull($columns, 'getPHID')); | ->withDestinationPHIDs(mpull($columns, 'getPHID')); | ||||
$edge_query->execute(); | $edge_query->execute(); | ||||
} | |||||
$task_map = array(); | $task_map = array(); | ||||
$default_phid = $columns[0]->getPHID(); | $default_phid = $columns[0]->getPHID(); | ||||
foreach ($tasks as $task) { | foreach ($tasks as $task) { | ||||
$task_phid = $task->getPHID(); | $task_phid = $task->getPHID(); | ||||
$column_phids = $edge_query->getDestinationPHIDs(array($task_phid)); | $column_phids = $edge_query->getDestinationPHIDs(array($task_phid)); | ||||
$column_phid = head($column_phids); | $column_phid = head($column_phids); | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |