JIRA Advanced JQL

Basic JQL finds issues by simple field values. Advanced JQL answers sharper questions: which issues changed status this week, which sprints stay open, which tasks sat untouched for two weeks. Functions, history keywords, and sorting rules unlock these searches.

Anatomy of a JQL Query

Every query combines fields, operators, and values. Keywords such as AND, OR, and ORDER BY join the pieces.

project = WEB AND status != Done AND assignee = currentUser() ORDER BY priority DESC
|______________|   |___________|   |____________________|   |____________________|
  condition 1        condition 2          condition 3             sorting rule

Operator Quick Reference

Common JQL Operators

OperatorMeaningExample
=Equalsstatus = "In Progress"
!=Does not equalpriority != Low
INMatches any value in a liststatus IN ("To Do", "In Progress")
NOT INMatches none of the listed valuesissuetype NOT IN (Epic, Subtask)
~Contains textsummary ~ "login"
IS EMPTYField has no valueassignee IS EMPTY
>, <, >=, <=Compares numbers and datescreated >= -7d

Date Functions

Date functions adjust automatically, so a saved filter stays fresh every day.

Useful Date Functions

FunctionReturns
now()The current moment
startOfDay()Midnight at the start of today
startOfWeek()The first moment of the current week
startOfMonth()The first moment of the current month
endOfWeek()The last moment of the current week

Relative dates work too. The value -14d means fourteen days ago, and 3d means three days from now.

User, Sprint, and Version Functions

  • currentUser() returns the person who runs the search.
  • membersOf("group") returns every user in a group.
  • openSprints() returns sprints that run right now.
  • closedSprints() returns finished sprints.
  • futureSprints() returns planned sprints that have not started.
  • unreleasedVersions() returns versions that have not shipped.
  • releasedVersions() returns versions that already shipped.

History Searches

JIRA remembers every change to an issue. History keywords search that memory.

History Keywords

KeywordQuestion It AnswersExample
WASDid the field ever hold this value?status WAS "In Review"
WAS NOTDid the field never hold this value?status WAS NOT "Done"
CHANGEDDid the field change?status CHANGED AFTER startOfWeek()
CHANGED FROM ... TODid the field move between two values?status CHANGED FROM "To Do" TO "In Progress"

Sorting Results

ORDER BY arranges the results. ASC sorts low to high, and DESC sorts high to low. Multiple rules separate with commas.

ORDER BY priority DESC, created ASC

That rule lists urgent issues first and shows the oldest of them at the top.

Grouping Conditions with Parentheses

Parentheses control the order of evaluation. A query without them can return surprising results.

project = WEB AND (status = "To Do" OR status = "In Progress")

Without the parentheses, JIRA reads the OR part as a separate branch and may return issues from other projects.

Ready-to-Use Queries

Real-World JQL Examples

GoalQuery
My open workassignee = currentUser() AND resolution = Unresolved
Overdue issuesduedate < now() AND resolution = Unresolved
Created this weekcreated >= startOfWeek()
Stale issuesupdated <= -14d AND statusCategory != Done
Current sprint worksprint IN openSprints() AND project = WEB
Unassigned bugsissuetype = Bug AND assignee IS EMPTY

Common Mistakes

  • Forgetting quotes around values with spaces, such as "In Progress".
  • Using = on text fields where ~ fits better.
  • Mixing AND with OR without parentheses.
  • Copying a query with curly quotes from a document. JQL needs straight quotes.

Summary

Advanced JQL builds on basic searches with functions, history keywords, and sorting rules. Date functions keep filters current. History searches reveal what changed and when. Parentheses protect the logic of complex queries. A small library of saved queries answers daily questions in seconds.