How can I automatically close issues?

I'm using JIRA service desk, cloud.

I notice a few small automation features, but nothing that would allow me to automatically close issues based on data like time spent, issue type, etc.

Is this possible?

4 answers

Hi Tony,


Unfortunately it is not possible in a Cloud instance. sad



Henrique Freitas

The only method of doing this sort of automation would be externally. JIRA Cloud instances can enable Remote API access, so you can write a script in just about any scripting language (such as Python..) that can perform the following – 

  • Remotely request issues that match a query such as "type=Request AND updated(-30d)"
  • Store the list of issues you receive
  • Remotely transition each issue to Closed, setting a Resolution and adding a comment if you wish

The point is you can do it but you have to maintain the 'service' yourself.

If you can define a JQL statement that identifies your conditions for closure, then, using JIRA Command Line Interface (CLI), you can use something like the following in your favorite job scheduler:

jira --action runFromIssueList --jql "status = resolved AND resolutiondate < -1w" --common "--action transitionIssue --issue @issue@ --transition \"Close Issue\" "

Hi Tony,

Here's how I achieved automation for closing an issue after timeout with JIRA Service Desk:

  1. Create an SLA, 'Waiting on Customer'
    1. All issues, 24/7, 336h
    2. 336 hours, or 2 weeks, in that state before it is breeched
  2. Create a custom automation rule, 'Close issue on timeout'
    1. When: SLA Time Remaining for 'Waiting on Customer' is breeched
    2. Then: Comment on the issue publicly to let the customer know, and transition to Done
    3. (I also comment internally for the assignee to let them know it is closing)

Does it sound like that approach would work in your scenario?

Thanks Tony, have a great day,
Nick Muldoon
Arijea, creators of Easy Agile User Story Maps and Easy Agile Roadmaps for JIRA


I just wrangled this out with a customer today, and we came to the same solution! So funny to see it right now on a question I'm watching. smile

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,947 views 19 22
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you