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 PhabricatorSearchTextField()) | |||||
->setLabel(pht('Contains Words')) | |||||
->setKey('fulltext'), | |||||
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 All 39 Lines | protected function getDefaultFieldOrder() { | ||||
return array( | return array( | ||||
'assignedPHIDs', | 'assignedPHIDs', | ||||
'projectPHIDs', | 'projectPHIDs', | ||||
'authorPHIDs', | 'authorPHIDs', | ||||
'subscriberPHIDs', | 'subscriberPHIDs', | ||||
'statuses', | 'statuses', | ||||
'priorities', | 'priorities', | ||||
'subtypes', | 'subtypes', | ||||
'fulltext', | |||||
'hasParents', | 'hasParents', | ||||
'hasSubtasks', | 'hasSubtasks', | ||||
'parentIDs', | 'parentIDs', | ||||
'subtaskIDs', | 'subtaskIDs', | ||||
'group', | 'group', | ||||
'order', | 'order', | ||||
'ids', | 'ids', | ||||
'...', | '...', | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | protected function buildQueryFromParameters(array $map) { | ||||
if ($map['hasParents'] !== null) { | if ($map['hasParents'] !== null) { | ||||
$query->withOpenParents($map['hasParents']); | $query->withOpenParents($map['hasParents']); | ||||
} | } | ||||
if ($map['hasSubtasks'] !== null) { | if ($map['hasSubtasks'] !== null) { | ||||
$query->withOpenSubtasks($map['hasSubtasks']); | $query->withOpenSubtasks($map['hasSubtasks']); | ||||
} | } | ||||
if (strlen($map['fulltext'])) { | |||||
$query->withFullTextSearch($map['fulltext']); | |||||
} | |||||
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']); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines |