Searching approvals with JQL

Searching approvals with JQL

Overview

Approval Path now indexes every issue that has an approval definition applied, so you can find work items by where they stand in an approval (pending, approved, or rejected) and by who still needs to act. You search this state two ways: by querying the indexed approval fields directly in Jira's issue search and saved filters, or through custom JQL functions that wrap those fields in a friendlier syntax. The same queries also work inside the app's own list views.

What you get

Frame 140.png
  • Nine custom JQL functions that wrap those fields and surface in Jira's search autocomplete alongside built-in functions.

  • Indexed approval fields: you can query directly in Jira search and saved filters, the most precise and up-to-date option.

  • Pending, approved, and rejected filtering: match work items by the approval definitions that are in progress, have passed, or have failed.

  • Approver filtering: find issues whose pending step is waiting on a specific user, group, or external email.

  • Group decision filtering: find issues where a group approved or rejected a step.

  • A "waiting on me" (My pending approvals) view: use currentUser() to list every issue currently awaiting your decision.

  • In-app JQL filtering: use JQL search/filtering in Approvals, Activity, and Conditions tab inside Approval Path.

Prerequisites

  • Only issues that carry Approval Path data are returned. An issue must have at least one approval definition applied to it before it appears in any result. The exception is issue not in with an Approval Path function: it also returns work items that have no approvals.

  • Searches by definition take a numeric definition ID. You can find ID when creating or reviewing approval definition.

New to JQL?

image-20260527-141026.png

JQL (Jira Query Language) is the text-based search Jira uses for advanced issue search. You reach it from the issue navigator by switching the search bar to JQL(the toggle next to basic search), or anywhere you save a filter.

 

A query is built from clauses, each shaped as field operator value:

status = "In Progress"

Join clauses with AND and OR, and reverse a clause with NOT. Wrap values that contain spaces in double quotes, and group lists in parentheses:

project = OPS AND status IN ("To Do", "In Progress")

The operators this feature relies on:

Operator

Meaning

Example

Operator

Meaning

Example

=

Equals a single value

pendingDefinitionIds = 1024

IN (…)

Equals any value in the list

pendingDefinitionIds IN (1024, 1099)

IS NOT EMPTY

The field has at least one value

definitionIds IS NOT EMPTY

IS EMPTY

The field has no value

pendingDefinitionIds IS EMPTY

in / not in (with a function)

Issue is (or isn't) returned by an app function

issue in approvalPending()

currentUser() is a built-in JQL function that stands in for whoever runs the query, so a single saved filter works for everyone. Add ORDER BY at the end to sort, for example ORDER BY created DESC. For the full language, see Atlassian's advanced search documentation.


How to find a definition ID

Pending, approved, and rejected searches match on the ID of an approval path definition. You can find this number in two places:

Frame 137.png
Definitions list: shown as a column on each row.
Frame 138.png
Definition Editing View: open the Audit section, where it is labelled Definition ID.

The ID is stable for the life of the definition, so you can save it in shared filters and dashboards.


Custom JQL functions

Frame 141 (1).png

The functions are a convenience layer over the indexed approval fields. Use them on the right of issue in, or issue not in to match the opposite set:

issue in approvalPending() issue not in approvalPending()

issue not in returns every work item that the matching issue in query does not return, including work items without any approval.

 

Function arguments must be plain values, either numbers or quoted text. A JQL function such as currentUser() cannot be passed as an argument, and there is no no-argument "for me" function either. Jira caches a function's results by function and arguments and shares that cache between users, so a function that resolved to the caller would serve one person's results to everyone. For anything personal, query the field directly with = currentUser(), which Jira evaluates per request.

Jira caches each function's results and refreshes them on its own schedule, so a function can briefly lag behind a freshly changed approval. If you need the most current result, query the fields directly instead.

Filtering by approval state

These three functions accept up to five definition IDs. The argument count changes what they match:

Call

What it matches

Call

What it matches

approvalPending()

Any issue with at least one approval still in progress

approvalPending(1024)

Issues where definition 1024 is in progress

approvalPending(1024, 1099, 1100)

Issues where any of the listed definitions is in progress

The same pattern applies to all three:

Function

Matches issues where the definition is…

Function

Matches issues where the definition is…

approvalPending

In progress and awaiting a decision

approvalApproved

Finished and approved

approvalRejected

Finished and rejected

Examples:

issue in approvalPending() issue in approvalApproved(1024) issue in approvalRejected(1024, 1099)

You can combine them with any other JQL:

project = OPS AND issue in approvalPending(1024) ORDER BY created DESC

Filtering by approver

These functions match issues whose pending step is still waiting on a given approver. They take one required argument and only consider steps that have not yet been decided.

Function

Argument

Matches issues awaiting…

Function

Argument

Matches issues awaiting…

approvalPendingFor

A user account ID

…that user's decision

approvalPendingForGroup

A group name

…a decision from that group

approvalPendingForEmail

An external email address

…a decision from that external approver

approvalPendingForAnyStep

A user account ID

…that user's decision in any active step (named directly, through a group, in a vote step, or as a delegate)

Examples:

issue in approvalPendingFor("5b10a2844c20165700ede21g") issue in approvalPendingForGroup("Finance Approvers") issue in approvalPendingForEmail("auditor@partner.com") issue in approvalPendingForAnyStep("5b10a2844c20165700ede21g")

approvalPendingFor matches only approvers named individually on a step. Someone who is pending because they belong to a group on the step is matched by approvalPendingForGroup, not by their account ID.

Each approver function takes one value. To match several approvers at once, query the field with IN instead, for example issue.property[approvalPath].pendingApproverGroupNames IN ("Finance Approvers", "Legal").

Filtering by group decision

These functions match issues where a group has already decided on a step. They take one group name.

Function

Argument

Matches issues where…

Function

Argument

Matches issues where…

approvalApprovedByGroup

A group name

…the group approved a Group step or a Vote step

approvalRejectedByGroup

A group name

…the group rejected a Group step or a Vote step

Examples:

issue in approvalApprovedByGroup("Finance Approvers") issue in approvalRejectedByGroup("Legal")

What counts:

  • A step counts once the group has decided on it. The approval itself can still be in progress.

  • A Group step that only notifies, a step that is still pending, and a skipped step do not count.

  • The group name is the name stored on the step, the same value approvalPendingForGroup uses. A Group step built from a user picker field is listed under the field's name.

  • When an approval is deleted or archived, its groups are removed, unless the same group made the same decision in another active approval on the work item.

  • When an approval's validity expires, it stops counting. A relaunched approval counts again only after a new decision.

Finding the approvals waiting on you

Query the field directly, with currentUser() as the value:

issue.property[approvalPath].pendingApproverAccountIdsAllSteps = currentUser()

This covers every active step where your decision is still required, whether you were named individually, are a member of a group on the step, or can vote on it. It includes steps you hold as someone's delegate, and it drops you as soon as you have decided.

It resolves per viewer, so one saved filter serves everyone.

The older field pendingApproverAccountIds still works and covers individually named approvers only. Use the newer field unless you specifically want to exclude group and vote steps.

Very large groups are excluded. A step whose group expands beyond 500 people is left out of this field, though it stays findable with pendingApproverGroupNames. When the in-app filter uses this field it shows a note to that effect.

Querying the approval fields directly

This is the most precise way to search, and it reflects approval changes as soon as Jira reindexes them, without the caching layer the functions sit behind. Use these fields when you want exact control, additional operators such as IS EMPTY, or the freshest possible results. The searchable fields are:

Field

Type

Holds

Field

Type

Holds

issue.property[approvalPath].definitionIds

number

All approval definitions on the issue

issue.property[approvalPath].pendingDefinitionIds

number

Definitions currently in progress

issue.property[approvalPath].approvedDefinitionIds

number

Definitions that finished approved

issue.property[approvalPath].rejectedDefinitionIds

number

Definitions that finished rejected

issue.property[approvalPath].pendingApproverAccountIdsAllSteps

string

Account IDs of everyone whose decision is still required, across user, group, and vote steps, including delegates and excluding anyone who has already decided

issue.property[approvalPath].pendingApproverAccountIds

string

Account IDs of pending approvers

issue.property[approvalPath].pendingApproverGroupNames

string

Group names of pending approvers (works for both Group and Vote steps)

issue.property[approvalPath].pendingApproverExternalEmails

string

External emails of pending approvers

issue.property[approvalPath].approvedApproverGroupNames

string

Names of groups whose Group or Vote step finished as Approved

issue.property[approvalPath].rejectedApproverGroupNames

string

Names of groups whose Group or Vote step finished as Rejected

Examples:

issue.property[approvalPath].definitionIds IS NOT EMPTY issue.property[approvalPath].pendingDefinitionIds = 1024 issue.property[approvalPath].rejectedDefinitionIds IN (1024, 1099) issue.property[approvalPath].pendingApproverGroupNames = "Finance Approvers" issue.property[approvalPath].pendingApproverAccountIds IN ("5b10...", "62cd...")

Approver fields are exact-match text. There's no partial or "contains" search, so use the whole account ID, group name, or email. Definition fields are numbers. All seven fields accept =, IN (…), IS EMPTY, and IS NOT EMPTY.


Where you can use these queries

These run in following places:

Jira's advanced search

In the issue navigator and saved filters. Use the full clause (including issue in …() for functions), add ORDER BY to sort, and save the query as a filter to reuse it or to power a board or dashboard.

In-app filter

Approval Path's Approvals, Activity and Conditions tabs each include a JQL box. Open it, type your query into the Search for work items with JQL box, and select Update.

Tab availability varies by level:

Tab

Available levels

Tab

Available levels

Approvals

Personal, Space, Global

Activity

Personal, Space, Global

Conditions

Space, Global

Frame 139.png

In-app filtering behaves slightly differently from Jira advanced search:

  • The app automatically scopes results to Approval Path data, so you don't need to add that condition.

  • The resulting order comes from column sorting. JQL ORDER BY clause does not affect the view.

  • Up to 5000 work items are used. If more match, the first 5000 are used and the message "Showing the first 5000 matching work items. Refine your JQL to narrow the results." appears.

Jira Automation rules

Approval Path JQL functions and fields can be used in any JQL field of an automation rule, such as Scheduled trigger JQL filters or 'Lookup issues' actions.

image-20260402-162420.png

See Jira Automation & Approval Path Integration


Example queries

Approval fields and functions combine with standard Jira fields such as project, assignee, status, priority, and due:

Goal

Query

Goal

Query

Everything waiting on my decision

issue.property[approvalPath].pendingApproverAccountIdsAllSteps = currentUser()

Waiting on me and overdue

issue.property[approvalPath].pendingApproverAccountIdsAllSteps = currentUser() AND due < now()

Pending approvals in a project

project = OPS AND issue.property[approvalPath].pendingDefinitionIds IS NOT EMPTY

High-priority work items still pending

priority = High AND issue.property[approvalPath].pendingDefinitionIds IS NOT EMPTY

Approved under a definition, updated this week

issue.property[approvalPath].approvedDefinitionIds = 1024 AND updated >= -7d

Rejected approvals assigned to me

assignee = currentUser() AND issue.property[approvalPath].rejectedDefinitionIds IS NOT EMPTY

Pending, with nothing approved yet

issue.property[approvalPath].pendingDefinitionIds IS NOT EMPTY AND issue.property[approvalPath].approvedDefinitionIds IS EMPTY

Work items a group still needs to approve

issue in approvalPendingForGroup("Finance Approvers")

Work items a group has approved

issue in approvalApprovedByGroup("Finance Approvers")

All work items with a pending approval, newest first

issue in approvalPending() ORDER BY created DESC

currentUser() resolves to whoever is signed in, so the "waiting on me" queries work for every user without editing them.


Common questions

My query returns nothing, but I know there are matching issues.

Only issues that have an approval definition applied are indexed. An issue with no Approval Path data never appears in results. Confirm the issue actually has an approval and that you're using the correct definition ID.

approvalApproved(1024) doesn't list an issue I just approved.

Two delays can apply. The approval index updates shortly after a decision, and the functions add a caching layer on top that refreshes on Jira's own schedule, so a function can lag a little longer than expected. For the freshest result, query the field directly: issue.property[approvalPath].approvedDefinitionIds = 1024. Also confirm the decision finished the whole definition. approvalApproved matches definitions that completed as approved, not individual approved steps.

How do I find approvals waiting on me?

Query the field with currentUser() as the value:

issue.property[approvalPath].pendingApproverAccountIdsAllSteps = currentUser()

because JQL doesn't allow a function as a function argument. Using pendingApproverAccountIdsAllSteps ensures that all active steps awaiting your decision are included.

Which definition ID do I use?

Use the numeric ID from the definitions list or the Definition ID field in a definition's Audit section. Approval functions accept numeric definition IDs only. Non-numeric arguments (such as definition names) are ignored.

Can I match more than five definitions at once?

The definition functions accept up to five IDs. To cover more, combine calls with OR, for example issue in approvalPending(1, 2, 3, 4, 5) OR issue in approvalPending(6, 7).

Why does approvalPendingFor only return some of an approver's issues?

It matches only active steps still awaiting a decision where the person is named individually. Issues where they already approved, where their step hasn't started yet, or where they're an approver only through group membership are not returned. Use approvalPendingForGroup for the group case.

Why does approvalPendingForGroupstill match my group after one member approved?

Group Steps stay pending until all required members of that step have decided. A single member's approval doesn't remove the group from the pending list.

Why don't my approver queries update right away after an approver is changed?

When an approver on an active step is reassigned or updated, the indexed approver fields can lag until the next Approval Path action on the same ticket (such as another approval starting, completing, or being deleted).

For Group and Vote steps, there's an additional layer: Approval Path caches group membership for 24 hours. Member changes (someone added to or removed from a group, or a Vote step's eligible voters changing) may take up to 24 hours to be reflected in queries.

The 24-hour cache duration is intentional, set to balance data freshness with Atlassian's API rate limit constraints. Fetching fresh group membership on every approval action would multiply API calls and risk hitting rate limits, especially on tenants with many active approvals. Workspace admins can force an immediate refresh through the Clear cache option in global settings.

Can I find issues where an approval was rejected by a specific person or group?

For a group, yes: use approvalRejectedByGroup("<group name>") or approvalApprovedByGroup("<group name>"). For a single person, not directly. Use approvalRejected(<definitionId>) to find rejected definitions.

Comments