1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

Make user and project profile links into Maniphest show only open tasks

Summary:
A couple of things here:

  - These links got fixed, but they show all user or project tasks. They should show only open ones.
  - Add an anchor so we jump you straight to the results, since the query UI is like a thousand miles tall now. We might take some other approaches here too, but let's see if this feels reasonable.

Test Plan: Clicked "View Tasks" from Profile and Projects. Executed some queries.

Reviewers: btrahan

Reviewed By: btrahan

CC: euresti, aran, chad

Differential Revision: https://secure.phabricator.com/D7014
This commit is contained in:
epriestley 2013-09-17 11:30:39 -07:00
parent e8bb24fd60
commit a695f264bf
2 changed files with 7 additions and 3 deletions

View file

@ -24,10 +24,10 @@ final class ManiphestPeopleMenuEventListener extends PhutilEventListener {
$object = $event->getValue('object');
if ($object instanceof PhabricatorUser) {
$href = '/maniphest/?assigned='.$object->getPHID();
$href = '/maniphest/?statuses[]=0&assigned='.$object->getPHID().'#R';
$actions[] = $action->setHref($href);
} else if ($object instanceof PhabricatorProject) {
$href = '/maniphest/?allProjects[]='.$object->getPHID();
$href = '/maniphest/?statuses[]=0&allProjects[]='.$object->getPHID().'#R';
$actions[] = $action->setHref($href);
$actions[] = id(new PhabricatorActionView())

View file

@ -97,7 +97,7 @@ final class PhabricatorApplicationSearchController
$saved_query = $engine->buildSavedQueryFromRequest($request);
$this->saveQuery($saved_query);
return id(new AphrontRedirectResponse())->setURI(
$engine->getQueryResultsPageURI($saved_query->getQueryKey()));
$engine->getQueryResultsPageURI($saved_query->getQueryKey()).'#R');
}
$named_query = null;
@ -190,6 +190,10 @@ final class PhabricatorApplicationSearchController
$nav->appendChild($filter_view);
if ($run_query) {
$nav->appendChild(
$anchor = id(new PhabricatorAnchorView())
->setAnchorName('R'));
$query = $engine->buildQueryFromSavedQuery($saved_query);
$pager = new AphrontCursorPagerView();