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\" "
0 votes

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,861 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot