1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 21:40:55 +01:00

Amended D2009 based on feedback from @epriestley.

Test Plan:
Try out https://secure.phabricator.com/maniphest/view/projectall/?g=j  with tasks assigned to just one project,
          and also with tasks assigned to more than one project.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2012
This commit is contained in:
20after4 2012-03-30 10:55:18 -07:00 committed by epriestley
parent 83d6bbeb29
commit 75e89c0c78
2 changed files with 7 additions and 5 deletions

View file

@ -301,7 +301,7 @@ final class ManiphestTaskListController extends ManiphestController {
}
public static function loadTasks(PhabricatorSearchQuery $search_query) {
$any_project = false;
$user_phids = $search_query->getParameter('userPHIDs', array());
$project_phids = $search_query->getParameter('projectPHIDs', array());
$task_ids = $search_query->getParameter('taskIDs', array());
@ -357,13 +357,15 @@ final class ManiphestTaskListController extends ManiphestController {
break;
case 'projecttriage':
$query->withPriority(ManiphestTaskPriority::PRIORITY_TRIAGE);
$query->withAnyProject(true);
$any_project = true;
break;
case 'projectall':
$query->withAnyProject(true);
$any_project = true;
break;
}
$query->withAnyProject($any_project);
$order_map = array(
'priority' => ManiphestTaskQuery::ORDER_PRIORITY,
'created' => ManiphestTaskQuery::ORDER_CREATED,
@ -465,7 +467,7 @@ final class ManiphestTaskListController extends ManiphestController {
$grouped = array();
foreach ($data as $task) {
$phids = $task->getProjectPHIDs();
if ($project_phids) {
if ($project_phids && $any_project !== true) {
// If the user is filtering on "Bugs", don't show a "Bugs" group
// with every result since that's silly (the query also does this
// on the backend).

View file

@ -504,7 +504,7 @@ final class ManiphestTaskQuery {
$ii = 0;
foreach ($tasks as $key => $task) {
$phids = $task->getProjectPHIDs();
if ($this->projectPHIDs) {
if (!$this->anyProject && $this->projectPHIDs) {
$phids = array_diff($phids, $this->projectPHIDs);
}
if ($phids) {