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

Allow filtering maniphest tasks authored by agents

Summary:
Addes a button group to filter tasks by agents, non-agents or all.

Fixes T3394

Test Plan: View task list, filter by agents, filter by non agents. Make sure the correct tasks display.

Reviewers: epriestley, dctrwatson

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3394

Differential Revision: https://secure.phabricator.com/D6328
This commit is contained in:
Gareth Evans 2013-06-30 07:11:23 -07:00 committed by epriestley
parent 6857ffb6f5
commit fde37a18cf
3 changed files with 8 additions and 2 deletions

View file

@ -180,7 +180,7 @@ final class ManiphestTaskListController extends ManiphestController {
}
$form->appendChild(
id(new AphrontFormTokenizerControl())
->setDatasource('/typeahead/common/users/')
->setDatasource('/typeahead/common/authors/')
->setName('set_authors')
->setLabel(pht('Authors'))
->setValue($tokens));

View file

@ -18,6 +18,7 @@ final class PhabricatorTypeaheadCommonDatasourceController
$need_rich_data = false;
$need_users = false;
$need_agents = false;
$need_applications = false;
$need_all_users = false;
$need_lists = false;
@ -47,6 +48,10 @@ final class PhabricatorTypeaheadCommonDatasourceController
case 'users':
$need_users = true;
break;
case 'authors':
$need_users = true;
$need_agents = true;
break;
case 'mailable':
$need_users = true;
$need_lists = true;
@ -163,7 +168,7 @@ final class PhabricatorTypeaheadCommonDatasourceController
foreach ($users as $user) {
if (!$need_all_users) {
if ($user->getIsSystemAgent()) {
if (!$need_agents && $user->getIsSystemAgent()) {
continue;
}
if ($user->getIsDisabled()) {

View file

@ -82,6 +82,7 @@ final class AphrontFormTokenizerControl extends AphrontFormControl {
$map = array(
'users' => pht('Type a user name...'),
'authors' => pht('Type a user name...'),
'usersorprojects' => pht('Type a user or project name...'),
'searchowner' => pht('Type a user name...'),
'accounts' => pht('Type a user name...'),