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

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

This widget could not be displayed.
Warren Levy Community Champion Jan 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

Ouch!, thanks Warren for the update.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

278 views 1 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you