Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/query/ManiphestTaskSearchEngine.php
| Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | return array( | ||||
| id(new PhabricatorSearchDatasourceField()) | id(new PhabricatorSearchDatasourceField()) | ||||
| ->setLabel(pht('Subtypes')) | ->setLabel(pht('Subtypes')) | ||||
| ->setKey('subtypes') | ->setKey('subtypes') | ||||
| ->setAliases(array('subtype')) | ->setAliases(array('subtype')) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht('Search for tasks with given subtypes.')) | pht('Search for tasks with given subtypes.')) | ||||
| ->setDatasource(new ManiphestTaskSubtypeDatasource()) | ->setDatasource(new ManiphestTaskSubtypeDatasource()) | ||||
| ->setIsHidden($hide_subtypes), | ->setIsHidden($hide_subtypes), | ||||
| id(new PhabricatorPHIDsSearchField()) | |||||
| ->setLabel(pht('Columns')) | |||||
| ->setKey('columnPHIDs') | |||||
| ->setAliases(array('column', 'columnPHID', 'columns')), | |||||
| id(new PhabricatorSearchThreeStateField()) | id(new PhabricatorSearchThreeStateField()) | ||||
| ->setLabel(pht('Open Parents')) | ->setLabel(pht('Open Parents')) | ||||
| ->setKey('hasParents') | ->setKey('hasParents') | ||||
| ->setAliases(array('blocking')) | ->setAliases(array('blocking')) | ||||
| ->setOptions( | ->setOptions( | ||||
| pht('(Show All)'), | pht('(Show All)'), | ||||
| pht('Show Only Tasks With Open Parents'), | pht('Show Only Tasks With Open Parents'), | ||||
| pht('Show Only Tasks Without Open Parents')), | pht('Show Only Tasks Without Open Parents')), | ||||
| ▲ Show 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | protected function buildQueryFromParameters(array $map) { | ||||
| if ($map['parentIDs']) { | if ($map['parentIDs']) { | ||||
| $query->withParentTaskIDs($map['parentIDs']); | $query->withParentTaskIDs($map['parentIDs']); | ||||
| } | } | ||||
| if ($map['subtaskIDs']) { | if ($map['subtaskIDs']) { | ||||
| $query->withSubtaskIDs($map['subtaskIDs']); | $query->withSubtaskIDs($map['subtaskIDs']); | ||||
| } | } | ||||
| if ($map['columnPHIDs']) { | |||||
| $query->withColumnPHIDs($map['columnPHIDs']); | |||||
| } | |||||
| $group = idx($map, 'group'); | $group = idx($map, 'group'); | ||||
| $group = idx($this->getGroupValues(), $group); | $group = idx($this->getGroupValues(), $group); | ||||
| if ($group) { | if ($group) { | ||||
| $query->setGroupBy($group); | $query->setGroupBy($group); | ||||
| } | } | ||||
| if ($map['ids']) { | if ($map['ids']) { | ||||
| $ids = $map['ids']; | $ids = $map['ids']; | ||||
| ▲ Show 20 Lines • Show All 328 Lines • Show Last 20 Lines | |||||