mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01: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:
parent
6857ffb6f5
commit
fde37a18cf
3 changed files with 8 additions and 2 deletions
|
@ -180,7 +180,7 @@ final class ManiphestTaskListController extends ManiphestController {
|
||||||
}
|
}
|
||||||
$form->appendChild(
|
$form->appendChild(
|
||||||
id(new AphrontFormTokenizerControl())
|
id(new AphrontFormTokenizerControl())
|
||||||
->setDatasource('/typeahead/common/users/')
|
->setDatasource('/typeahead/common/authors/')
|
||||||
->setName('set_authors')
|
->setName('set_authors')
|
||||||
->setLabel(pht('Authors'))
|
->setLabel(pht('Authors'))
|
||||||
->setValue($tokens));
|
->setValue($tokens));
|
||||||
|
|
|
@ -18,6 +18,7 @@ final class PhabricatorTypeaheadCommonDatasourceController
|
||||||
$need_rich_data = false;
|
$need_rich_data = false;
|
||||||
|
|
||||||
$need_users = false;
|
$need_users = false;
|
||||||
|
$need_agents = false;
|
||||||
$need_applications = false;
|
$need_applications = false;
|
||||||
$need_all_users = false;
|
$need_all_users = false;
|
||||||
$need_lists = false;
|
$need_lists = false;
|
||||||
|
@ -47,6 +48,10 @@ final class PhabricatorTypeaheadCommonDatasourceController
|
||||||
case 'users':
|
case 'users':
|
||||||
$need_users = true;
|
$need_users = true;
|
||||||
break;
|
break;
|
||||||
|
case 'authors':
|
||||||
|
$need_users = true;
|
||||||
|
$need_agents = true;
|
||||||
|
break;
|
||||||
case 'mailable':
|
case 'mailable':
|
||||||
$need_users = true;
|
$need_users = true;
|
||||||
$need_lists = true;
|
$need_lists = true;
|
||||||
|
@ -163,7 +168,7 @@ final class PhabricatorTypeaheadCommonDatasourceController
|
||||||
|
|
||||||
foreach ($users as $user) {
|
foreach ($users as $user) {
|
||||||
if (!$need_all_users) {
|
if (!$need_all_users) {
|
||||||
if ($user->getIsSystemAgent()) {
|
if (!$need_agents && $user->getIsSystemAgent()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($user->getIsDisabled()) {
|
if ($user->getIsDisabled()) {
|
||||||
|
|
|
@ -82,6 +82,7 @@ final class AphrontFormTokenizerControl extends AphrontFormControl {
|
||||||
|
|
||||||
$map = array(
|
$map = array(
|
||||||
'users' => pht('Type a user name...'),
|
'users' => pht('Type a user name...'),
|
||||||
|
'authors' => pht('Type a user name...'),
|
||||||
'usersorprojects' => pht('Type a user or project name...'),
|
'usersorprojects' => pht('Type a user or project name...'),
|
||||||
'searchowner' => pht('Type a user name...'),
|
'searchowner' => pht('Type a user name...'),
|
||||||
'accounts' => pht('Type a user name...'),
|
'accounts' => pht('Type a user name...'),
|
||||||
|
|
Loading…
Reference in a new issue