@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add 'dependsOn' array to `ConduitApi_maniphest_Method::buildTaskInfoDictionaries()` return

Summary: Adds the PHIDs of the tasks that the current task depends on.

Test Plan: Use conduit to query a task with and without tasks it depends on.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5892

+13 -1
+13 -1
src/applications/maniphest/conduit/ConduitAPI_maniphest_Method.php
··· 207 207 return array(); 208 208 } 209 209 210 + $task_phids = mpull($tasks, 'getPHID'); 211 + 210 212 $all_aux = id(new ManiphestTaskAuxiliaryStorage())->loadAllWhere( 211 213 'taskPHID in (%Ls)', 212 - mpull($tasks, 'getPHID')); 214 + $task_phids); 213 215 $all_aux = mgroup($all_aux, 'getTaskPHID'); 214 216 217 + $all_deps = id(new PhabricatorEdgeQuery()) 218 + ->withSourcePHIDs($task_phids) 219 + ->withEdgeTypes(array(PhabricatorEdgeConfig::TYPE_TASK_DEPENDS_ON_TASK)); 220 + $all_deps->execute(); 221 + 215 222 $result = array(); 216 223 foreach ($tasks as $task) { 217 224 $auxiliary = idx($all_aux, $task->getPHID(), array()); 218 225 $auxiliary = mpull($auxiliary, 'getValue', 'getName'); 226 + 227 + $task_deps = $all_deps->getDestinationPHIDs( 228 + array($task->getPHID()), 229 + array(PhabricatorEdgeConfig::TYPE_TASK_DEPENDS_ON_TASK)); 219 230 220 231 $result[$task->getPHID()] = array( 221 232 'id' => $task->getID(), ··· 235 246 'objectName' => 'T'.$task->getID(), 236 247 'dateCreated' => $task->getDateCreated(), 237 248 'dateModified' => $task->getDateModified(), 249 + 'dependsOnTaskPHIDs' => $task_deps, 238 250 ); 239 251 } 240 252