Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL Filter doesnt work as expected

Andreas Kemper
Contributor
February 9, 2026

Hello everyone.
I'd like to use this JQL filter: "project = 'XXX' and key > XXX-100 and key < XXX-200 ORDER BY key ASC".
I want to see all tickets whose key lies between XXX-100 and XXX-200.
However, Jira only accepts this filter if the tickets for the lower and upper limit actually exist.
This is problematic because I don't know the exact key of the first and last tickets in the queried range. Maybe, ticket XXX-100 doesn't even exist.

Background: I want to retrieve all tickets for a project via API. This is only possible in blocks of 100 because the API has a "maxResult = 100" limit.

Any ideas?
Suggestions?
Solutions?

Thanks a lot, best regards, and have a great start to the week!

Andreas

3 answers

5 votes
Florian Bonniec
Community Champion
February 9, 2026

Hi @Andreas Kemper 

 

It do not work because JQL compare to issues in the index, if the issue XXX-100 do not exist it cannot use it for comparaison.

 

If you want to retrieve all tickets from a project you do not need this, you can use this endpoint

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-jql-get

You have then nextPageToken in teh response to fetch next page if any.

 

Regards

1 vote
Daniel Turczanski
Contributor
February 12, 2026

Hey @Andreas Kemper You can get 5000 issues only if you ask for the id,key fields. Any other fields will limit the page to 100 issues

 

See the documentation of maxResults query paremeter here https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-jql-get

 

What's your use case and why do you want to get all the tickets for the project?

0 votes
Akash Singh
Community Champion
February 9, 2026

@Andreas Kemper Building on @Florian Bonniec’s answer, you can increase the number of issues returned in a single response by restricting the payload to only the fields you actually need. This can be done using the fields parameter along with maxResults, which allows you to fetch up to 5,000 work items per request.

For larger result sets, you can retrieve subsequent pages by using the nextPageToken value returned in the response.

Your API endpoint would look something like this:

curl --request GET \
  --url 'https://your-domain.atlassian.net/rest/api/3/search/jql?jql=project%20%3D%20HSP&nextPageToken=<string>&maxResults=5000&fields={fields}' \
  --user 'email@example.com:<api_token>' \
  --header 'Accept: application/json'

 

Andreas Kemper
Contributor
February 11, 2026


@Akash Singh Thanks for your comment. Unfortunately it doesnt work for me. I'm sure I do sth wrong but I have no idea so far.

I followed your advise and used the 'fields' param in my jql. =>
"https://our-domain.atlassian.net/rest/api/3/search/jql?jql=project = 'PP' and type = 'Story' ORDER BY issuekey ASC&fields=summary&maxResults=200"
The result is ok but still limited to 100 entries. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events