/** * @return bool */ private function performSearch() { // calculate how many issues are already loaded and continue at this index $index = $this->startAt + sizeof($this->issues); if ($this->total > $index || $this->total === false) { $comm_object = new \stdClass(); $comm_object->jql = $this->jql; $comm_object->startAt = $index; $comm_object->maxResults = $this->maxResults; if (!empty($this->expand)) { $comm_object->expand = $this->expand; } if (!empty($this->fields)) { $comm_object->fields = $this->fields; } $result = $this->issueService->getCommunicationService()->post('search', $comm_object); if ($result !== false) { $this->total = $result->total; $this->parseAndAddIssues($result->issues); // check if the expected amount of issues was retrieved if (sizeof($this->issues) == $index + $this->maxResults || sizeof($this->issues) == $this->total) { return true; } } } return false; }
/** * Return communication service. * @return \biologis\JIRA_PHP_API\ICommunicationService */ public function getCommunicationService() { return $this->issueService->getCommunicationService(); }