Cycle Time and Lead Time are two of the clearest signals of process health. The problem is that neither number is a native Jira field. Plain JQL can't filter, sort, or automate on either one, no matter how the query is written.
This article explains why there is a gap, how to close it once, and three JQL searches that are worthwhile to develop after you do.
Plain JQL Tracks Events, Not Durations
JQL is built to find issues based on a point-in-time value or a change event: current status, when a field changed, when an issue was created or updated. It has no aggregate or summing function, so it can't add up how long an issue has spent in a status over its lifetime.
A query like updated <= -3d finds issues nobody has touched in three days. That's a proxy for a stale ticket, not a measurement of Cycle Time. It ignores every status the issue passed through before its last update and any time it sat idle in between. To search by Cycle Time or Lead Time directly, the duration has to already exist on the issue as a stored value. JQL can search a value. It can't calculate one.
Turn a Duration Into a Real Jira Field
This is what the Custom Field feature in Timepiece - Time in Status for Jira is for. You define which statuses make up a metric, and Timepiece totals the time issues spend in those statuses and writes the result to a standard Jira custom field on a schedule.
The configuration screen controls more than most people expect:
Setting | What it does |
|---|
Statuses to Track | Which workflow statuses count toward this metric (e.g., In Progress + Waiting for Approval for Cycle Time) |
View Format | How the value is displayed on the issue (days, hours, minutes, or a combination) |
Calendar Settings | Whether weekends and non-working hours are excluded from the count |
Day Length | How many hours count as one day — this changes what ".days" means in a JQL search, not just what shows on the issue |
JQL Query | Which issues get a value calculated at all |
Issue Limit | Maximum number of issues processed per calculation run (1–5,000) |
Update Interval | How often the background calculation refreshes (15 minutes to 30 days) |
Execute as User | The account the calculation runs as — it needs read access to the issues in the JQL Query above |
Once saved, the field behaves like any other Jira custom field. It holds a number, it shows on the issue view, and it's fully searchable.
Three JQL Searches Worth Setting Up
- Catch a slipping ticket before it shows up in sprint review "
Cycle Time.hours" > 72 AND status != Done This flags open issues that have already accumulated more active work time than your internal threshold, so you find them mid-sprint instead of during the retro. - Separate planning delay from work delay JQL can't subtract one custom field from another, so you can't ask for "Lead Time minus Cycle Time" in a single query. Instead, run two saved searches side by side:
"Lead Time.days" > 15 "Cycle Time.days" < 5 Issues that show up in both are spending most of their life waiting to start, not being worked on. That's a backlog or approval problem, not an execution problem. - Let Jira Automation watch the number for you Because the field is a normal custom field, the same JQL works as a condition inside a Jira Automation rule. Set a scheduled trigger, add the field as a JQL condition, and have the rule comment, reassign, or post to a channel once a ticket crosses your threshold. No one has to remember to run the search manually.
How the Field Name Works in JQL
Once the field exists, three suffixes control the unit of the search:
"Field Name.days" — value in days"Field Name.hours" — value in hours"Field Name.minutes" — value in minutes
Standard operators apply: >, <, =, >=, <=, !=. The field also appears in Jira's JQL autocomplete by its raw custom field ID (shown as cf[xxxxx]), so either form works in a saved filter.
None of this requires rebuilding a dashboard or exporting data. Once a duration exists as a field, it's just another value Jira already knows how to filter, sort, put on a board, or automate on.
To learn more about Timepiece - Time in Status for Jira and improve workflow efficiency, visit its marketplace listing page.