Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/query/ManiphestTaskQuery.php
| Show First 20 Lines • Show All 429 Lines • ▼ Show 20 Lines | protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | ||||
| if ($this->priorities !== null) { | if ($this->priorities !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'task.priority IN (%Ld)', | 'task.priority IN (%Ld)', | ||||
| $this->priorities); | $this->priorities); | ||||
| } | } | ||||
| if ($this->subpriorities !== null) { | |||||
| $where[] = qsprintf( | |||||
| $conn, | |||||
| 'task.subpriority IN (%Lf)', | |||||
| $this->subpriorities); | |||||
| } | |||||
| if ($this->bridgedObjectPHIDs !== null) { | if ($this->bridgedObjectPHIDs !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'task.bridgedObjectPHID IN (%Ls)', | 'task.bridgedObjectPHID IN (%Ls)', | ||||
| $this->bridgedObjectPHIDs); | $this->bridgedObjectPHIDs); | ||||
| } | } | ||||
| if ($this->subtypes !== null) { | if ($this->subtypes !== null) { | ||||
| ▲ Show 20 Lines • Show All 386 Lines • ▼ Show 20 Lines | protected function getResultCursor($result) { | ||||
| } | } | ||||
| return $id; | return $id; | ||||
| } | } | ||||
| public function getBuiltinOrders() { | public function getBuiltinOrders() { | ||||
| $orders = array( | $orders = array( | ||||
| 'priority' => array( | 'priority' => array( | ||||
| 'vector' => array('priority', 'subpriority', 'id'), | 'vector' => array('priority', 'id'), | ||||
| 'name' => pht('Priority'), | 'name' => pht('Priority'), | ||||
| 'aliases' => array(self::ORDER_PRIORITY), | 'aliases' => array(self::ORDER_PRIORITY), | ||||
| ), | ), | ||||
| 'updated' => array( | 'updated' => array( | ||||
| 'vector' => array('updated', 'id'), | 'vector' => array('updated', 'id'), | ||||
| 'name' => pht('Date Updated (Latest First)'), | 'name' => pht('Date Updated (Latest First)'), | ||||
| 'aliases' => array(self::ORDER_MODIFIED), | 'aliases' => array(self::ORDER_MODIFIED), | ||||
| ), | ), | ||||
| ▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | return parent::getOrderableColumns() + array( | ||||
| 'reverse' => true, | 'reverse' => true, | ||||
| ), | ), | ||||
| 'title' => array( | 'title' => array( | ||||
| 'table' => 'task', | 'table' => 'task', | ||||
| 'column' => 'title', | 'column' => 'title', | ||||
| 'type' => 'string', | 'type' => 'string', | ||||
| 'reverse' => true, | 'reverse' => true, | ||||
| ), | ), | ||||
| 'subpriority' => array( | |||||
| 'table' => 'task', | |||||
| 'column' => 'subpriority', | |||||
| 'type' => 'float', | |||||
| ), | |||||
| 'updated' => array( | 'updated' => array( | ||||
| 'table' => 'task', | 'table' => 'task', | ||||
| 'column' => 'dateModified', | 'column' => 'dateModified', | ||||
| 'type' => 'int', | 'type' => 'int', | ||||
| ), | ), | ||||
| 'closed' => array( | 'closed' => array( | ||||
| 'table' => 'task', | 'table' => 'task', | ||||
| 'column' => 'closedEpoch', | 'column' => 'closedEpoch', | ||||
| 'type' => 'int', | 'type' => 'int', | ||||
| 'null' => 'tail', | 'null' => 'tail', | ||||
| ), | ), | ||||
| ); | ); | ||||
| } | } | ||||
| protected function getPagingValueMap($cursor, array $keys) { | protected function getPagingValueMap($cursor, array $keys) { | ||||
| $cursor_parts = explode('.', $cursor, 2); | $cursor_parts = explode('.', $cursor, 2); | ||||
| $task_id = $cursor_parts[0]; | $task_id = $cursor_parts[0]; | ||||
| $group_id = idx($cursor_parts, 1); | $group_id = idx($cursor_parts, 1); | ||||
| $task = $this->loadCursorObject($task_id); | $task = $this->loadCursorObject($task_id); | ||||
| $map = array( | $map = array( | ||||
| 'id' => $task->getID(), | 'id' => $task->getID(), | ||||
| 'priority' => $task->getPriority(), | 'priority' => $task->getPriority(), | ||||
| 'subpriority' => $task->getSubpriority(), | |||||
| 'owner' => $task->getOwnerOrdering(), | 'owner' => $task->getOwnerOrdering(), | ||||
| 'status' => $task->getStatus(), | 'status' => $task->getStatus(), | ||||
| 'title' => $task->getTitle(), | 'title' => $task->getTitle(), | ||||
| 'updated' => $task->getDateModified(), | 'updated' => $task->getDateModified(), | ||||
| 'closed' => $task->getClosedEpoch(), | 'closed' => $task->getClosedEpoch(), | ||||
| ); | ); | ||||
| foreach ($keys as $key) { | foreach ($keys as $key) { | ||||
| Show All 36 Lines | |||||