Issues returned by JAVA API Limited to 100 against on-cloud JIRA

Chris Covert January 17, 2018

Hello,

We have a JAVA application (written in Eclipse) which uses the API to execute a saved filter. This filter will return 500+ records successfully, however our company migrated from on-premise JIRA to JIRA On-Cloud and ever since going to on-cloud: our Filter call only returns 100 issues or less (depending on query). Running the code against our read-only instance on-premise will return the 500+ issues we expect.

We have played around with changing maxResults, maxResultsperRequest (not sure if these are API variables or created in-house - sorry I am not the coder).

No where's in the code have we set a variable to 100. (again we did not change the code after migrating)

Could pagination be the problem?

  • maxResults is the maximum number of items that can be returned per page. Each API endpoint may have a different limit for the number of items returned, and these limits may change without notice.

/**
* Uses a pre-defined filter to search through issues.
* @param filterID
* @param maxResults Set to -1 for maximum.
* @return A list of issues.
* @throws IOException
*/
public List<Issue> searchFilter(String filterID, int maxResults) throws IOException {
JsonObject filter = get("rest/api/2/filter/" + filterID);
//Main.getLogger().info("Searching with JIRA filter \"" + filter.get("name").getAsString() + "\".");

String jql = filter.get("jql").getAsString();
maxResults = 1000;
// Alternatively, can use a get request with this url (but there's limited space in a url for the query)
//String url = filter.get("searchUrl").getAsString();

return search(jql, maxResults);
}

 

thanks

 

Chris
/**

 

 

1 answer

1 vote
Warren
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2018

Hi Chris

This changed September last year - see https://jira.atlassian.com/browse/JRACLOUD-67570. I actually thought that it was Server as well as cloud, but you'll need to use the startAt parameter and multiple calls to get more than 100 results. There have also been numerous complaints about this, see this as an example of some

Chris Covert January 18, 2018

Ouch!, thanks Warren for the update.

Kin August 31, 2020

I feel this pain also.

Suggest an answer

Log in or Sign up to answer