javajirajqljira-rest-java-api

Jira REST Java Client get all issues using searchJql


I am trying to get all issues from the project using JQL query but get only 50, I know that it is a problem, but how I can figure out with it?

Promise<SearchResult> searchJqlPromiseTest = client.getSearchClient().searchJql("project = UARECR ");
for (Issue issue : searchJqlPromiseTest.claim().getIssues()) {
    System.out.println(issue.getId());
}

Solution

  • Use this function, which accepts 4 params:

    Jira rest API searchRestClient.searchJql

    Now you can set the maxResults value. Since you are not setting it, it is defaulting to 50