Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/query/ManiphestTaskSearchEngine.php
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | foreach ($ids as $key => $id) { | ||||
if (!$id || !is_numeric($id)) { | if (!$id || !is_numeric($id)) { | ||||
unset($ids[$key]); | unset($ids[$key]); | ||||
} else { | } else { | ||||
$ids[$key] = $id; | $ids[$key] = $id; | ||||
} | } | ||||
} | } | ||||
$saved->setParameter('ids', $ids); | $saved->setParameter('ids', $ids); | ||||
$dependent_ids = $request->getStrList('dependentIds'); | |||||
foreach ($dependent_ids as $key => $id) { | |||||
$id = trim($id, ' Tt'); | |||||
if (!$id || !is_numeric($id)) { | |||||
unset($ids[$key]); | |||||
} else { | |||||
$dependent_ids[$key] = $id; | |||||
} | |||||
} | |||||
$saved->setParameter('dependentIds', $dependent_ids); | |||||
$saved->setParameter('fulltext', $request->getStr('fulltext')); | $saved->setParameter('fulltext', $request->getStr('fulltext')); | ||||
$saved->setParameter( | $saved->setParameter( | ||||
'allProjectPHIDs', | 'allProjectPHIDs', | ||||
$this->readPHIDsFromRequest($request, 'allProjects')); | $this->readPHIDsFromRequest($request, 'allProjects')); | ||||
$saved->setParameter( | $saved->setParameter( | ||||
'withNoProject', | 'withNoProject', | ||||
▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | if ($group) { | ||||
$query->setGroupBy(head($this->getGroupValues())); | $query->setGroupBy(head($this->getGroupValues())); | ||||
} | } | ||||
$ids = $saved->getParameter('ids'); | $ids = $saved->getParameter('ids'); | ||||
if ($ids) { | if ($ids) { | ||||
$query->withIDs($ids); | $query->withIDs($ids); | ||||
} | } | ||||
$dependent_ids = $saved->getParameter('dependentIds'); | |||||
if ($dependent_ids) { | |||||
$query->withDependentIDs($dependent_ids); | |||||
} | |||||
$fulltext = $saved->getParameter('fulltext'); | $fulltext = $saved->getParameter('fulltext'); | ||||
if (strlen($fulltext)) { | if (strlen($fulltext)) { | ||||
$query->withFullTextSearch($fulltext); | $query->withFullTextSearch($fulltext); | ||||
} | } | ||||
$with_no_project = $saved->getParameter('withNoProject'); | $with_no_project = $saved->getParameter('withNoProject'); | ||||
if ($with_no_project) { | if ($with_no_project) { | ||||
$query->withAllProjects(array(ManiphestTaskOwner::PROJECT_NO_PROJECT)); | $query->withAllProjects(array(ManiphestTaskOwner::PROJECT_NO_PROJECT)); | ||||
▲ Show 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | foreach (ManiphestTaskPriority::getTaskPriorityMap() as $pri => $name) { | ||||
$priority_control->addCheckbox( | $priority_control->addCheckbox( | ||||
'priorities[]', | 'priorities[]', | ||||
$pri, | $pri, | ||||
$name, | $name, | ||||
isset($priorities[$pri])); | isset($priorities[$pri])); | ||||
} | } | ||||
$ids = $saved->getParameter('ids', array()); | $ids = $saved->getParameter('ids', array()); | ||||
$dependent_ids = $saved->getParameter('dependentIds', array()); | |||||
$form | $form | ||||
->appendChild( | ->appendChild( | ||||
id(new AphrontFormTokenizerControl()) | id(new AphrontFormTokenizerControl()) | ||||
->setDatasource('/typeahead/common/accounts/') | ->setDatasource('/typeahead/common/accounts/') | ||||
->setName('assigned') | ->setName('assigned') | ||||
->setLabel(pht('Assigned To')) | ->setLabel(pht('Assigned To')) | ||||
->setValue($assigned_handles)) | ->setValue($assigned_handles)) | ||||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | $form | ||||
id(new AphrontFormTextControl()) | id(new AphrontFormTextControl()) | ||||
->setName('fulltext') | ->setName('fulltext') | ||||
->setLabel(pht('Contains Words')) | ->setLabel(pht('Contains Words')) | ||||
->setValue($saved->getParameter('fulltext'))) | ->setValue($saved->getParameter('fulltext'))) | ||||
->appendChild( | ->appendChild( | ||||
id(new AphrontFormTextControl()) | id(new AphrontFormTextControl()) | ||||
->setName('ids') | ->setName('ids') | ||||
->setLabel(pht('Task IDs')) | ->setLabel(pht('Task IDs')) | ||||
->setValue(implode(', ', $ids))); | ->setValue(implode(', ', $ids))) | ||||
->appendChild( | |||||
id(new AphrontFormTextControl()) | |||||
->setName('dependentIds') | |||||
->setLabel(pht('Dependent Task IDs')) | |||||
->setValue(implode(', ', $dependent_ids))); | |||||
$this->appendCustomFieldsToForm($form, $saved); | $this->appendCustomFieldsToForm($form, $saved); | ||||
$this->buildDateRange( | $this->buildDateRange( | ||||
$form, | $form, | ||||
$saved, | $saved, | ||||
'createdStart', | 'createdStart', | ||||
pht('Created After'), | pht('Created After'), | ||||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |