JQL filtering

JQL filtering

A JQL filter narrows which issues actually trigger the webhook. The event must (a) be a ticked issue event, and (b) the issue must match the JQL. Non-matching events are dropped.

JQL filtering is the single most effective way to keep webhook traffic clean. Filtering at source costs you nothing on the receiver, and it keeps the delivery log readable.


Where to set it

On the webhook form: Events tab → Issue Related Events sub-tab → JQL filter (input at the top). It's specific to this webhook and applies only to issue events on this webhook.

JQL is validated on save against Jira's parser — invalid JQL blocks the form with the parser's error message.


Basic examples

Goal

JQL

Goal

JQL

Only one project

project = ACME

Several projects

project in (ACME, BETA, GAMMA)

High and Highest priority

priority in ("High", "Highest")

Bugs only

issuetype = Bug

One assignee

assignee = currentUser() (see note below)

Combine

project = ACME AND priority in ("High", "Highest") AND issuetype = Bug

Exclude a status

status != "Closed"

Issues in a sprint

sprint in openSprints()

Issues with a label

labels = "production-incident"

Component

component = "Auth"


What the JQL is evaluated against

For every issue event, Webhooks Pro runs your JQL with an extra clause that constrains it to the event's issue:

({your JQL}) AND issue = {event.issueKey}

If Jira's JQL evaluator returns match, the event proceeds to debounce and delivery. If not, the event is silently dropped (no log row, since the delivery never happened).

This means JQL functions that depend on the executing user behave differently than you might expect:

  • currentUser() resolves to the app's own Jira account, not to the user who triggered the event. Use assignee = "<accountId>" if you need a specific person.

  • Time-based functions (startOfDay(), endOfWeek()) resolve at the moment the event is processed, which is what you'd expect.

  • myUnresolved() and similar user-scoped functions are not useful here.


Where it does not apply

  • Project Related, User Related, Configuration Events — JQL is an issue query, so it has no meaning for events that aren't about an issue. Even if you have a JQL set, those events fire whenever ticked.

  • Comment / worklog / attachment events — these include the parent issue in the event. The JQL is applied to that parent issue, so project = ACME correctly limits comment events to comments on ACME issues.

  • Scheduled webhooks — schedule webhooks require a JQL (it's the source of the issue list) and the rules are different. See Scheduled webhooks.


Validation rules

  • JQL is parsed by Jira on save — same parser as the issue search bar in Jira.

  • Invalid syntax → save fails with the parser's error message inline on the form.

  • Empty JQL → no filter, every issue event for the ticked types fires the webhook.

  • Reference to a deleted custom field or status → save still succeeds (Jira accepts it as syntactically valid), but no events will ever match. Watch out for this when projects are reorganised.


Performance

  • JQL is evaluated per event. For very high-volume tenants, prefer simple, indexed clauses (project, issuetype, status, priority) over expensive ones (text ~, cf[12345] is EMPTY).

  • Webhooks Pro caches nothing about your JQL — Jira's own JQL evaluator handles caching. Recently-deployed projects, custom fields, or workflows may take a couple of minutes to reflect in JQL evaluation, on Atlassian's side.


Common patterns

Per-environment routing

Multiple webhooks, each with its own JQL, all subscribed to the same events:

Webhook

JQL

Webhook

JQL

Production alerts

project = OPS AND labels = "prod"

Staging alerts

project = OPS AND labels = "staging"

Dev noise

project = OPS AND labels = "dev"

Severity routing

Webhook

JQL

Webhook

JQL

Page on-call

priority = "Highest"

Notify Slack

priority in ("High", "Medium")

(no webhook)

priority in ("Low", "Lowest")

Limit to recently-changed issues during backfill

When you first set up a webhook, you don't want it to refire on every historical issue update. JQL doesn't gate historical events (those have already happened) — it gates new events. So this just works: a brand-new webhook only fires on events from the moment it was created onward.


What if the JQL needs to depend on the event itself?

JQL is the issue filter; it can't reference the event type. To gate by event type, untick that event on the Events tab. To gate by changelog content (e.g., only when status changes), filter on the receiver — there's no JQL clause for that.

For more event-aware filtering, the Trigger Webhook post function is a better fit — it fires only on a specific workflow transition.


Common mistakes

Mistake

What happens

Fix

Mistake

What happens

Fix

Use currentUser() expecting the editor

Resolves to the app account; no events match

Use assignee = "<accountId>" or drop the clause.

Use text ~ "something" on every event

High-volume tenants pay extra JQL cost per event

Filter on indexed fields where possible.

JQL references a deleted custom field

Save accepts; nothing fires

Audit JQL after schema changes.

Use JQL on Project / User / Configuration tabs

JQL is ignored for these events

Untick those events instead.

Empty JQL but expected only one project

Every issue across every project fires

Add project = ACME.


Related