Show only open tasks on Tasks people profile panel

Summary: This currently queries all tasks, make it limit to only open tasks.

Test Plan: Assign myself an open and a resolved task. See only open on profile.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17476
This commit is contained in:
Chad Little 2017-03-07 07:34:08 -08:00
parent 129483d5ea
commit 0b4ccdade9

View file

@ -57,14 +57,13 @@ final class PhabricatorPeopleProfileTasksController
private function buildTasksView(PhabricatorUser $user) { private function buildTasksView(PhabricatorUser $user) {
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$open = ManiphestTaskStatus::getOpenStatusConstants();
$tasks = id(new ManiphestTaskQuery()) $tasks = id(new ManiphestTaskQuery())
->setViewer($viewer) ->setViewer($viewer)
->withOwners(array($user->getPHID())) ->withOwners(array($user->getPHID()))
->withStatuses($open)
->needProjectPHIDs(true) ->needProjectPHIDs(true)
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
))
->setLimit(100) ->setLimit(100)
->execute(); ->execute();
@ -74,7 +73,7 @@ final class PhabricatorPeopleProfileTasksController
->setUser($viewer) ->setUser($viewer)
->setHandles($handles) ->setHandles($handles)
->setTasks($tasks) ->setTasks($tasks)
->setNoDataString(pht('No assigned tasks.')); ->setNoDataString(pht('No open, assigned tasks.'));
$view = id(new PHUIObjectBoxView()) $view = id(new PHUIObjectBoxView())
->setHeaderText(pht('Assigned Tasks')) ->setHeaderText(pht('Assigned Tasks'))