mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +01:00
Add full text search to maniphest.query
Summary: ...also swapped "status" and "order" so "status" is first, as in my testing it was sub-optimal to specifiy status (more of "what i want") after order ("how I want it") Test Plan: ran various queries on my test instance via conduit console and the results all seem correct Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1381 Differential Revision: https://secure.phabricator.com/D3028
This commit is contained in:
parent
f5c08f113e
commit
96860c5cc1
1 changed files with 17 additions and 11 deletions
|
@ -33,13 +33,6 @@ class ConduitAPI_maniphest_query_Method
|
|||
|
||||
public function defineParamTypes() {
|
||||
|
||||
$orders = array(
|
||||
ManiphestTaskQuery::ORDER_PRIORITY,
|
||||
ManiphestTaskQuery::ORDER_CREATED,
|
||||
ManiphestTaskQuery::ORDER_MODIFIED,
|
||||
);
|
||||
$orders = implode(', ', $orders);
|
||||
|
||||
$statuses = array(
|
||||
ManiphestTaskQuery::STATUS_ANY,
|
||||
ManiphestTaskQuery::STATUS_OPEN,
|
||||
|
@ -52,14 +45,22 @@ class ConduitAPI_maniphest_query_Method
|
|||
);
|
||||
$statuses = implode(', ', $statuses);
|
||||
|
||||
$orders = array(
|
||||
ManiphestTaskQuery::ORDER_PRIORITY,
|
||||
ManiphestTaskQuery::ORDER_CREATED,
|
||||
ManiphestTaskQuery::ORDER_MODIFIED,
|
||||
);
|
||||
$orders = implode(', ', $orders);
|
||||
|
||||
return array(
|
||||
'ownerPHIDs' => 'optional list',
|
||||
'authorPHIDs' => 'optional list',
|
||||
'projectPHIDs' => 'optional list',
|
||||
'ccPHIDs' => 'optional list',
|
||||
'fullText' => 'optional string',
|
||||
|
||||
'order' => 'optional enum<'.$orders.'>',
|
||||
'status' => 'optional enum<'.$statuses.'>',
|
||||
'order' => 'optional enum<'.$orders.'>',
|
||||
|
||||
'limit' => 'optional int',
|
||||
'offset' => 'optional int',
|
||||
|
@ -98,9 +99,9 @@ class ConduitAPI_maniphest_query_Method
|
|||
$query->withSubscribers($ccs);
|
||||
}
|
||||
|
||||
$order = $request->getValue('order');
|
||||
if ($order) {
|
||||
$query->setOrderBy($order);
|
||||
$full_text = $request->getValue('fullText');
|
||||
if ($full_text) {
|
||||
$query->withFullTextSearch($full_text);
|
||||
}
|
||||
|
||||
$status = $request->getValue('status');
|
||||
|
@ -108,6 +109,11 @@ class ConduitAPI_maniphest_query_Method
|
|||
$query->withStatus($status);
|
||||
}
|
||||
|
||||
$order = $request->getValue('order');
|
||||
if ($order) {
|
||||
$query->setOrderBy($order);
|
||||
}
|
||||
|
||||
$limit = $request->getValue('limit');
|
||||
if ($limit) {
|
||||
$query->setLimit($limit);
|
||||
|
|
Loading…
Reference in a new issue