lesstif / php-jira-rest-client

PHP classes interact Jira with the REST API.
Other
510 stars 263 forks source link

Advanced JQL search: Only getting 15 issues back, but when I do the same JQL on the jira website, I get back many more. Please help? #84

Closed fuel-lhartwell closed 7 years ago

fuel-lhartwell commented 7 years ago

I should be getting back many more than 15. What am I doing wrong?

My code:

<?php
/*
JIRA REST API CLIENT https://github.com/lesstif/php-jira-rest-client#perform-an-advanced-search
*/

date_default_timezone_set('America/Los_Angeles');

require 'vendor/autoload.php'; // include Composer's autoloader

use JiraRestApi\Issue\IssueService;

//input is jira jql, returns total count of issues resulting from that jql search
function countIssues($jql)
{
    $issueService = new IssueService();
    $jiraResult = $issueService->search($jql);
    $issueCount = count($jiraResult->issues);

    return $issueCount;
}

  $jql = 'project = 10000 AND type = Bug';
  echo countIssues($jql)."\n";

?>

Result:

$ php test1.php 15

lesstif commented 7 years ago

sorry, i was omit document link to pagination jql. try it https://github.com/lesstif/php-jira-rest-client#jql-with-pagination.

thanks.