Home / JQL functions / hasWorklogs()
hasWorklogs() JQL function for Jira Cloud
Last updated 20/11/2026. Hooks is our product, and this page describes how its built-in function behaves.
hasWorklogs() keeps the work items from your inner JQL that have worklogs, meaning logged time. Syntax: issue in hasWorklogs("jql"). Use issue not in hasWorklogs("jql") to find completed work where nobody logged time. It works in the search bar, filters, boards and dashboards.
Syntax
issue in hasWorklogs("jql")
The matches that have worklogs. The function name is not case sensitive in the search bar, and you can use it anywhere Jira accepts JQL: the search bar, saved filters, boards, dashboard gadgets and subscriptions.
Arguments
| Argument | What it does |
|---|---|
jql | Required. A JQL query. The function keeps the matches that have worklogs. |
What it returns
Time tracking only helps if people use it. hasWorklogs makes compliance easy to check: list finished work with no time logged, or list billable work that does have it. Because the starting set is an inner JQL, you can scope it to a client, a team or a date range.
Three worked examples
Board filter: finished work with no time logged
issue not in hasWorklogs("project = ACME AND resolved >= -7d")
A team lead's board shows the work resolved this week that has no worklog, before timesheets close.
Dashboard gadget: billable work with logged time
issue in hasWorklogs("project = WEB AND labels = billable AND resolved >= startOfMonth()")
Finance sees which billable work this month has time recorded against it.
Automation: timesheet reminder
issue not in hasWorklogs("project = PLAT AND status = Done AND resolved >= -2d")
A rule can nudge assignees of work completed in the last two days that still has no logged time.
Saving it as a filter
There is nothing app-specific to save. Compose the query in Jira's own search bar, save it as a normal Jira filter, and use that filter on boards, dashboards, gadgets and subscriptions. The JQL functions tab in Hooks has a Try a search panel that previews the first matches of a query before you save it, which is a quick way to check the inner JQL does what you expect.
Using not in
Every built-in function returns the correct set for not in. issue not in hasWorklogs(...) matches every work item except the ones the function returns.
issue not in hasWorklogs("jql")
Limits you will see
- The inner search scans up to 25,000 matches and the function returns up to 12,000 work items.
- A bigger result shows too many results. You never get a silently cut-off list.
- Results refresh within about 5 minutes of a change to your data.
- A search with an invalid inner query degrades to a no-match result, so a saved filter keeps working.
ScriptRunner equivalent
In ScriptRunner you write issueFunction in hasWorklogs(...). In Hooks you write issue in hasWorklogs(...), and issueFunction not in becomes issue not in. The name carries over unchanged and takes an inner JQL. Saved Enhanced Search filters can be converted in place from the Migrate from ScriptRunner tab, which checks each one against ScriptRunner's current results first. See the migration docs and the Enhanced Search alternative guide.
Related functions
- hasComments() - The matches that have comments.
- hasAttachments() - The matches that have attachments.
- previousSprint() - The work items in a board's last completed sprint.
- All 15 built-in JQL functions, plus
hooked()for your own
Frequently asked questions
How do I find work with no time logged?
Use issue not in hasWorklogs("jql"). The built-in functions return the correct set for not in.
Does it show how much time was logged?
No. It tests whether a work item has worklogs. Use Jira's time tracking fields for amounts.
How many work items can hasWorklogs() return?
Up to 12,000. The inner search scans up to 25,000 matches, and a bigger result shows too many results instead of a cut-off list.
What is the ScriptRunner equivalent of hasWorklogs()?
Replace issueFunction in with issue in. The name carries over unchanged and takes an inner JQL.