Home / JQL functions / hasComments()
hasComments() JQL function for Jira Cloud
Last updated 20/11/2026. Hooks is our product, and this page describes how its built-in function behaves.
hasComments() keeps the work items from your inner JQL that have comments. Syntax: issue in hasComments("jql"). Write issue not in hasComments("jql") to find work nobody has commented on. Use it in saved filters, boards and dashboards.
Syntax
issue in hasComments("jql")
The matches that have comments. 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 comments. |
What it returns
Silence is a signal. A support ticket with no comment may never have been acknowledged. A pull request-style review with no discussion may not have been read. hasComments lets you build "nobody has said anything yet" lists, and the opposite, without wading through activity streams.
Three worked examples
Board filter: tickets nobody has replied to
issue not in hasComments("project = SUP AND status = Open AND created <= -2d")
The support lead's board shows open tickets older than two days with no comments, the unacknowledged ones.
Dashboard gadget: discussed proposals
issue in hasComments("project = ACME AND issuetype = Proposal AND created >= -60d")
Shows which proposals attracted discussion, a rough gauge of engagement.
Automation: unanswered requests
issue not in hasComments("project = PLAT AND issuetype = Request AND status = \"To Do\" AND created <= -3d")
A rule can alert the owning team about requests that nobody has responded to after three days.
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 hasComments(...) matches every work item except the ones the function returns.
issue not in hasComments("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 hasComments(...). In Hooks you write issue in hasComments(...), 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
- hasAttachments() - The matches that have attachments.
- hasWorklogs() - The matches that have worklogs.
- hasLinks() - The matches that have links.
- All 15 built-in JQL functions, plus
hooked()for your own
Frequently asked questions
How do I find work with no comments?
Use issue not in hasComments("jql"). The built-in functions return the correct set for not in.
Does it filter by who commented?
No. It only tests whether a work item has comments.
How many work items can hasComments() 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 hasComments()?
Replace issueFunction in with issue in. The name carries over unchanged and takes an inner JQL.