@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.

Rename ManiphestTaskQuery::withProjects() to withAllProjects()

Summary: After D3630, make the API more clear: withAllProjects() vs withAnyProjects()

Test Plan: Loaded project page, maniphest task query, reports, filtered by project and "noproject". Grep.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1610

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

+9 -6
+1 -1
src/applications/conduit/method/maniphest/ConduitAPI_maniphest_query_Method.php
··· 91 91 92 92 $projects = $request->getValue('projectPHIDs'); 93 93 if ($projects) { 94 - $query->withProjects($projects); 94 + $query->withAllProjects($projects); 95 95 } 96 96 97 97 $ccs = $request->getValue('ccPHIDs');
+2 -2
src/applications/maniphest/ManiphestTaskQuery.php
··· 98 98 return $this; 99 99 } 100 100 101 - public function withProjects(array $projects) { 101 + public function withAllProjects(array $projects) { 102 102 $this->includeNoProject = false; 103 103 foreach ($projects as $k => $phid) { 104 104 if ($phid == ManiphestTaskOwner::PROJECT_NO_PROJECT) { ··· 472 472 $project_dao = new ManiphestTaskProject(); 473 473 return qsprintf( 474 474 $conn, 475 - 'LEFT JOIN %T anyproject ON anyproject.taskPHID = task.phid', 475 + 'JOIN %T anyproject ON anyproject.taskPHID = task.phid', 476 476 $project_dao->getTableName()); 477 477 } 478 478
+1 -1
src/applications/maniphest/controller/ManiphestReportController.php
··· 406 406 $handles = $this->loadViewerHandles($phids); 407 407 $project_handle = $handles[$project_phid]; 408 408 409 - $query->withProjects($phids); 409 + $query->withAnyProjects($phids); 410 410 } 411 411 412 412 $tasks = $query->execute();
+4 -1
src/applications/maniphest/controller/ManiphestTaskListController.php
··· 425 425 ManiphestTaskPriority::getHighestPriority()); 426 426 427 427 $query = new ManiphestTaskQuery(); 428 - $query->withProjects($project_phids); 429 428 $query->withTaskIDs($task_ids); 429 + 430 + if ($project_phids) { 431 + $query->withAllProjects($project_phids); 432 + } 430 433 431 434 if ($xproject_phids) { 432 435 $query->withoutProjects($xproject_phids);
+1 -1
src/applications/project/controller/PhabricatorProjectProfileController.php
··· 247 247 PhabricatorProjectProfile $profile) { 248 248 249 249 $query = id(new ManiphestTaskQuery()) 250 - ->withProjects(array($project->getPHID())) 250 + ->withAnyProjects(array($project->getPHID())) 251 251 ->withStatus(ManiphestTaskQuery::STATUS_OPEN) 252 252 ->setOrderBy(ManiphestTaskQuery::ORDER_PRIORITY) 253 253 ->setLimit(10)