I'm trying to implement getting the results of the query at least in the console, I found such code:

package com.example.jirasandbox; import com.atlassian.jira.rest.client.api.JiraRestClient; import com.atlassian.jira.rest.client.api.JiraRestClientFactory; import com.atlassian.jira.rest.client.api.domain.BasicProject; import com.atlassian.jira.rest.client.api.domain.Issue; import com.atlassian.jira.rest.client.api.domain.SearchResult; import com.atlassian.jira.rest.client.api.domain.User; import com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory; import com.atlassian.util.concurrent.Promise; import java.net.URI; public class CustomJiraRestClient { private static final String JIRA_URL = "http://jira-dev:8080"; private static final String JIRA_ADMIN_USERNAME = "admin"; private static final String JIRA_ADMIN_PASSWORD = "admin"; public static void main(String[] args) throws Exception { // Construct the JRJC client System.out.println(String.format("Logging in to %s with username '%s' and password '%s'", JIRA_URL, JIRA_ADMIN_USERNAME, JIRA_ADMIN_PASSWORD)); JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory(); URI uri = new URI(JIRA_URL); JiraRestClient client = factory.createWithBasicHttpAuthentication(uri, JIRA_ADMIN_USERNAME, JIRA_ADMIN_PASSWORD); // Invoke the JRJC Client Promise<User> promise = client.getUserClient().getUser("admin"); User user = promise.claim(); for (BasicProject project : client.getProjectClient().getAllProjects().claim()) { System.out.println(project.getKey() + ": " + project.getName()); } Promise<SearchResult> searchJqlPromise = client.getSearchClient().searchJql("project = MYPURRJECT AND status in (Closed, Completed, Resolved) ORDER BY assignee, resolutiondate"); for (Issue issue : searchJqlPromise.claim().getIssues()) { System.out.println(issue.getSummary()); } // Print the result System.out.println(String.format("Your admin user's email address is: %s\r\n", user.getEmailAddress())); // Done System.out.println("Example complete. Now exiting."); System.exit(0); } } 

however, it displays only the first 50 entries, as in the Gira UI form, page output with 50 entries per page.

How can I get all filter results?

Or specify the page number from which you want to display the result?

  • Transfer the code from the link to the question, wrap it in the code tag ( {} button) - gil9red

0