Going Stellar

Home/JQL reference

JQL field

affectedVersion in JQL: field syntax and examples

The affectedVersion field matches work items by the version they were found in, by version name or ID. It is mostly used on bugs: which release has the problem, are there open bugs against a shipped release, and which bugs never got a version at all.

Syntax

affectedVersion = "2.1"
affectedVersion in releasedVersions()
affectedVersion = latestReleasedVersion(MOB)
affectedVersion is EMPTY

Works with

  • Field type: VERSION, with auto-complete
  • Operators: =, !=, >, >=, <, <=, IS, IS NOT, IN, NOT IN
  • Functions with = and !=: latestReleasedVersion(), earliestUnreleasedVersion()
  • Functions with IN and NOT IN: releasedVersions(), unreleasedVersions()
  • Not with: ~, !~, WAS, WAS IN, WAS NOT, WAS NOT IN, CHANGED

Examples

affectedVersion is EMPTY AND issuetype = Bug AND statusCategory != Done

Open bugs that were reported without saying which version they affect. Hard to reproduce, so worth a follow-up.

Run on Jira Cloud on .

issuetype = Bug AND affectedVersion is EMPTY AND created >= -4w

Bugs from the last four weeks that are missing a version, for a weekly clean-up of the bug template.

Run on Jira Cloud on .

affectedVersion in releasedVersions() AND resolution = Unresolved

Unresolved work reported against a release that has already shipped. These are the bugs customers can hit today.

Run on Jira Cloud on .

affectedVersion = latestReleasedVersion(MOB)

Everything reported against the newest released version of one project. A quick look at how a release is holding up.

Run on Jira Cloud on .

affectedVersion in releasedVersions(MOB) AND fixVersion is EMPTY AND statusCategory != Done

Open work found in a shipped release that is not planned for any fix version yet. A gap in release planning.

Run on Jira Cloud on .

affectedVersion in unreleasedVersions(WEB)

Work found in a version that has not shipped, which usually means a bug caught during testing.

Run on Jira Cloud on .

Pitfalls

  • An unknown version stops the query. affectedVersion = "3.14" gives "The value '3.14' does not exist for the field 'affectedVersion'." and an unknown ID gives "A value with ID '10350' does not exist for the field 'affectedVersion'." The Atlassian examples fail for that reason on a space without those versions (checked on Jira Cloud, November 2026).
  • There is no change history search on this field. affectedVersion changed gives "History searches do not support the 'affectedVersion' field." (checked on Jira Cloud, November 2026). Use the work item history view when you need to know who edited it.
  • Comparison operators follow the version order set by the space admin, not numeric or alphabetical order. affectedVersion > "2.0" also needs a version named 2.0 to exist, otherwise it fails with the unknown-value error.
  • In a space that has no versions, the version functions run and match nothing, while affectedVersion is EMPTY matches every work item. An empty result is not a sign of a broken query.

Questions and answers

What is the difference between affectedVersion and fixVersion?

affectedVersion says where a problem was found. fixVersion says which release is meant to contain the fix. A bug usually has the first set at creation and the second set when someone plans it.

Should I search by version name or ID?

The docs recommend the ID, because different spaces can have versions with the same name. A name is easier to read, so add project = KEY when you use one.

Sources

  1. JQL fields (Atlassian Support, Jira Cloud)

Markdown version · All JQL pages