I’m building an app where it will fetch the results (issues) from the JQL using this https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-search/#api-rest-api-2-search-get. Then, it will choose the winner (chosen assignee) by doing some random algorithm for that results.
The problem is, if I have thousands of results (eg. more than 10000 issues returned from the query), it will take a while to fetch all that since the API has a limit to fetch max 50 items per request (2-3 secs per request).
I tried to limit the maximum results by adding the form to put the limit (default limit is 1000). But what if there is a case where it needs to fetch more than 10000 results. Is there any efficient way to do this?
This question gets asked about once a month, like here for example, and the answer is always the same… the limits are there for a reason and you have to either:
- Do the requests in batches of 1,000 issues using pagination
- Make a more reasonable JQL query that doesn’t return 10,000 issues
It’s why when you Google ‘jira jql 1000 limit’ you’ll see dozens of articles which confirm that.
Thanks for the feedback and reference to a similar post.
I did applied a pagination for the fetching and also add a notice in my confluence page for the app to tell users to make a more reasonable JQL query that doesn’t return 10,000 issues.
Anyway, what I can think of now is, if there is a query that returns thousands of issues, I’ll try to implement prefetching in background before the actual use of that results.