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
/**
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.