Home / Troubleshooting / Unbounded JQL queries

"Unbounded JQL queries are not allowed here. Please add a search restriction to your query."

Last updated 20/11/2026. A Jira platform error, explained, with the fix.

This Jira error means your JQL has no restriction. A query made only of an ORDER BY clause, or an empty query, would match every work item, and Jira's search endpoint refuses to run it. Add any restriction, such as project = ABC or created >= -30d, and the search runs.

What the error means

Jira calls a query "unbounded" when nothing in it limits which work items can match. Sorting is not a limit: order by created DESC says how to order results, not which results to return. The search endpoint, /rest/api/3/search/jql, rejects such a query with a 400 Bad Request and the message above. Any one clause that narrows the results is enough to fix it.

Why you are seeing it

Unbounded versus bounded queries

Each query in the right-hand column adds a restriction. Any restriction will do, so choose the one that matches what you actually want to see.

Unbounded (rejected)Bounded (works)
order by created DESCcreated >= -30d order by created DESC
ORDER BY updatedproject = ABC ORDER BY updated
(empty query)status = "In Progress"
order by priority DESC, created ASCstatusCategory != Done order by priority DESC, created ASC

How to fix it

  1. Find the query that failed. In Hooks, the failed run in Run history shows the exact error and the line number of the script that sent it.
  2. Decide what you really want: one project, one status, recent work, one assignee.
  3. Add it as a clause in front of the ORDER BY, for example project = ABC ORDER BY updated.
  4. If a variable feeds the query, give it a safe default so a blank value cannot leave the query empty.
  5. Run it again. The same fix applies to jira.search and jira.forEachIssue in scripts.

How Hooks helps

Every JQL box in Hooks, including the one for bulk jobs, autocompletes field names, operators and live values from your site. As you type, the query is checked against Jira and the exact error, or Valid JQL, appears under the field, so you see a problem before you save. When a script sends an unbounded query, Hooks surfaces Jira's exact error with a line number. This is a Jira rule, not a Hooks limit, and the fix is always on the query. If you are also building filters with the built-in JQL functions, note that each function takes an inner JQL, and an invalid inner query degrades to a no-match result instead of breaking your saved filter.

Frequently asked questions

What does "Unbounded JQL queries are not allowed here" mean?

Jira refused to run a search that has no restriction. A query with only an ORDER BY clause, or an empty query, matches everything, and the search endpoint does not accept that.

How do I fix the unbounded JQL error?

Add any restriction to the query, such as a project, a status or a date range. For example, created >= -30d order by created DESC is accepted where order by created DESC is not.

Is this a Hooks limitation?

No. It is a Jira platform rule about the /rest/api/3/search/jql endpoint. Hooks shows you the exact error with a line number so you can fix the script quickly.

Does the error affect jira.search and jira.forEachIssue in scripts?

Yes. The rule applies to both, so give the JQL you pass to either one a restriction.

Try Hooks free for 30 days → Docs: limits and troubleshooting