A simple way to spot work that needs attention
Due dates help teams plan and prioritize work, but overdue issues can be hard to spot when a project has many active tasks. Jira’s issue search can find work whose due dates have passed. ScriptFabric makes it possible to run that search from the Script Console and review the results in one place.
This example finds unresolved issues with past due dates and displays up to 20 of them, including the issue key, summary, status, and due date. It’s a read-only search: it does not edit issues or send notifications.
The use case
Imagine a project lead preparing for a weekly review. They want to see which unresolved issues are already past their due date, so they can discuss blockers and agree on next steps with the team.
Instead of opening issues one by one, they can run a JQL search through WorkItems.search() and return a compact list of matching work.
Run the search in ScriptFabric
Open ScriptFabric → Script Console, then run:
const jql = 'resolution = Unresolved AND due < now() ORDER BY due ASC';
const issues = await WorkItems.search(jql).take(20);
return issues.map(issue => ({
key: issue.key,
summary: issue.summary,
status: issue.status,
dueDate: issue.dueDate
}));
The query looks for issues where the resolution is unresolved and the due date is earlier than the current time. It sorts the results by due date, with the oldest dates first. .take(20) limits the review to 20 matching issues.
Understanding the results
Each returned row contains:
- Key — the issue identifier, such as
APP-123. - Summary — a short description of the work.
- Status — the issue’s current workflow status.
- Due date — the date by which the work was expected to be completed.
The output can help a team quickly identify the oldest overdue work and decide which issues need follow-up.
Narrow the search to a project
To search within one project, add its project key to the JQL:
const jql =
'project = YOUR_PROJECT AND resolution = Unresolved AND due < now() ORDER BY due ASC';
const issues = await WorkItems.search(jql).take(20);
return issues.map(issue => ({
key: issue.key,
summary: issue.summary,
status: issue.status,
dueDate: issue.dueDate
}));
Replace YOUR_PROJECT with the project key you want to review. You can also adjust the JQL to match your team’s workflow or search criteria.
Why use WorkItems.search()?
WorkItems.search(jql) returns a lazy search result. It fetches issues as the script requests them, rather than loading every matching issue at once. In this example, .take(20) asks for only the first 20 results, making it convenient for a quick review.
The returned issue objects include useful fields such as key, summary, status, and dueDate, which the script maps into a concise result.
A read-only review
This script only searches for issues and returns selected details. It does not change due dates, transition statuses, assign work, or contact recipients. That makes it suitable for reviewing overdue work before deciding what action the team should take.
Try it with your project
Run the script in ScriptFabric’s Script Console, review the results, and replace the project key if you want to focus the search. You can use the same approach to build other read-only views with JQL and WorkItems.search()—for example, finding issues assigned to a particular user or filtering by status.
Use the search results as a starting point for your team’s review and follow-up.
