Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/query/ManiphestTaskQuery.php
| Show All 15 Lines | final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery { | ||||
| private $subscriberPHIDs = array(); | private $subscriberPHIDs = array(); | ||||
| private $anyProjectPHIDs = array(); | private $anyProjectPHIDs = array(); | ||||
| private $anyUserProjectPHIDs = array(); | private $anyUserProjectPHIDs = array(); | ||||
| private $includeNoProject = null; | private $includeNoProject = null; | ||||
| private $dateCreatedAfter; | private $dateCreatedAfter; | ||||
| private $dateCreatedBefore; | private $dateCreatedBefore; | ||||
| private $dateModifiedAfter; | private $dateModifiedAfter; | ||||
| private $dateModifiedBefore; | private $dateModifiedBefore; | ||||
| private $subpriorityMin; | |||||
| private $subpriorityMax; | |||||
| private $fullTextSearch = ''; | private $fullTextSearch = ''; | ||||
| private $status = 'status-any'; | private $status = 'status-any'; | ||||
| const STATUS_ANY = 'status-any'; | const STATUS_ANY = 'status-any'; | ||||
| const STATUS_OPEN = 'status-open'; | const STATUS_OPEN = 'status-open'; | ||||
| const STATUS_CLOSED = 'status-closed'; | const STATUS_CLOSED = 'status-closed'; | ||||
| const STATUS_RESOLVED = 'status-resolved'; | const STATUS_RESOLVED = 'status-resolved'; | ||||
| ▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | public function withPriorities(array $priorities) { | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function withSubpriorities(array $subpriorities) { | public function withSubpriorities(array $subpriorities) { | ||||
| $this->subpriorities = $subpriorities; | $this->subpriorities = $subpriorities; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function withSubpriorityBetween($min, $max) { | |||||
| $this->subpriorityMin = $min; | |||||
| $this->subpriorityMax = $max; | |||||
| return $this; | |||||
| } | |||||
| public function withSubscribers(array $subscribers) { | public function withSubscribers(array $subscribers) { | ||||
| $this->subscriberPHIDs = $subscribers; | $this->subscriberPHIDs = $subscribers; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function withFullTextSearch($fulltext_search) { | public function withFullTextSearch($fulltext_search) { | ||||
| $this->fullTextSearch = $fulltext_search; | $this->fullTextSearch = $fulltext_search; | ||||
| return $this; | return $this; | ||||
| ▲ Show 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | protected function loadPage() { | ||||
| if ($this->subpriorities) { | if ($this->subpriorities) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'task.subpriority IN (%Lf)', | 'task.subpriority IN (%Lf)', | ||||
| $this->subpriorities); | $this->subpriorities); | ||||
| } | } | ||||
| if ($this->subpriorityMin) { | |||||
| $where[] = qsprintf( | |||||
| $conn, | |||||
| 'task.subpriority >= %f', | |||||
| $this->subpriorityMin); | |||||
| } | |||||
| if ($this->subpriorityMax) { | |||||
| $where[] = qsprintf( | |||||
| $conn, | |||||
| 'task.subpriority <= %f', | |||||
| $this->subpriorityMax); | |||||
| } | |||||
| $where[] = $this->buildPagingClause($conn); | $where[] = $this->buildPagingClause($conn); | ||||
| $where = $this->formatWhereClause($where); | $where = $this->formatWhereClause($where); | ||||
| $having = ''; | $having = ''; | ||||
| $count = ''; | $count = ''; | ||||
| if (count($this->projectPHIDs) > 1) { | if (count($this->projectPHIDs) > 1) { | ||||
| ▲ Show 20 Lines • Show All 619 Lines • Show Last 20 Lines | |||||