How to Auto-Close Stale Jira Issues With No Recent Activity
Short answer: Use two scheduled Jira Automation rules: one that adds a stale label and a warning comment after N days without updates, and one that closes issues still labelled stale a week later. Add a third small rule that removes the label when someone comments. Watch out for two JQL traps: labels not in (stale) silently skips issues with no labels, and the warning comment itself resets updated.
Rule 1: warn
- Trigger: Scheduled, daily, with this JQL (leave "only include work items that changed since last run" unchecked):
project = ABC AND statusCategory != Done AND updated <= -30d AND (labels is EMPTY OR labels not in (stale)) - Actions: Edit work item > Labels: add
stale; Comment: "No activity for 30 days. This will be closed in 7 days unless someone comments."
Rule 2: close
- Trigger: Scheduled, daily:
project = ABC AND statusCategory != Done AND labels = stale AND updated <= -7d - Actions: Transition work item to Done / Won't do (set a Resolution if your workflow uses one), then comment "Closed automatically after 37 days without activity. Reopen if still needed."
Because the warning comment updates the issue, updated <= -7d here really means "nobody touched it since the warning".
Rule 3: un-stale on reply
- Trigger: Work item commented. Condition: Labels contains
stale, and the comment author is not the automation user. Action: remove thestalelabel.
Traps and tips
- "Updated" isn't "replied". Any edit (a sprint change, a bot adding a link) resets
updated, so busy-but-abandoned issues are never caught. If what you really mean is "nobody has replied", base the rule on a last-comment date instead (see JQL for issues with no comment in X days). - Exclude what shouldn't close: add
AND priority not in (Highest) AND issuetype != Epicor akeep-openlabel. - Dry run first: run the JQL in search, or make rule 1 only add the label for a week before enabling rule 2.
- Automation usage: scheduled rules count toward your monthly Automation limit; one daily run covering many issues is cheaper than per-issue triggers.
- JSM: service projects ship with templates such as closing requests left in Waiting for customer; start there for customer tickets.
Close on "no reply", not "no edit"
Jira has a read-only Days since last comment field type, but it isn't searchable, so you can't use it in a rule's JQL. A searchable last-comment date makes stale rules accurate.
See Last Comment Fields Email us to try it early
With it, rule 1's JQL becomes statusCategory != Done AND "Last comment date" <= -30d.
FAQ
Why does my stale rule miss issues with no labels? In JQL, labels not in (x) excludes issues whose labels are empty. Add "labels is EMPTY OR" to the clause.
Will the warning comment reset the stale timer? Yes, it updates the issue. That is why the close rule checks updated <= -7d after the label was added.
Can I auto-close based on the last comment instead of updated? Yes, if you have a searchable last-comment date field, filled by Automation or an app. Jira's built-in Days since last comment field is not searchable.
Do scheduled rules count toward Automation limits? Yes. Each run that finds work items counts, so prefer one daily scheduled rule over per-issue triggers.
Related guides
- JQL: How to Find Jira Issues With No Comment in the Last X Days
- JQL: Find Jira Issues Where Someone Outside Your Team Commented Last
- How to Show the Last Comment as a Column in Jira Cloud's List View
- All Jira Cloud guides
Disclosure: Loomwise makes the apps mentioned in the cards above and wrote this guide. Not affiliated with Atlassian. Vote counts and ticket statuses are from jira.atlassian.com as of October 2026. Last checked October 2026; Jira menus and features change, so verify in your site. Contact: hello@loomwise.app