JQL for stale and stuck Jira work items
Short answer
For work nobody has touched in two weeks:
statusCategory != Done AND updated <= -14d ORDER BY updated ASC
updated is the last time anything changed on the work item. -14d means "14 days before now", so <= -14d reads as "last changed 14 or more days ago". statusCategory != Done keeps it to open work whatever your workflow's status names are.
Stuck in a status
A work item can be updated often and still be stuck. This finds items that entered In Progress more than 30 days ago and are still in progress:
statusCategory = "In Progress" AND status changed to "In Progress" before -30d ORDER BY updated ASC
The CHANGED ... BEFORE clause looks at status history, so it works even when other fields keep moving updated. Replace "In Progress" with your own status name if your workflow calls it something else.
Flagged and reopened work
flagged = Impediment AND statusCategory != Done ORDER BY updated ASC
status changed from Done to "In Progress" ORDER BY updated DESC
The first lists open items someone flagged as blocked. The second finds work that was marked Done and then pulled back, which is often a sign of an incomplete fix.
Owned by people who have left
assignee in inactiveUsers() AND statusCategory != Done
inactiveUsers() returns deactivated accounts. Anything this finds has no one working on it, whatever its status says.
Where these queries mislead
updatedmoves on any change, including an automation rule editing a field or someone adding a label. A work item can look fresh while nobody has worked on it.- JQL has no field for the last comment date.
updatedis not a substitute; see how to search Jira by last comment date. - Relative dates such as
-14dcount calendar days, not working days.