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

Cheers,

 

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 vote
Nicholas Muldoon Community Champion Aug 08, 2016

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 4 hours ago in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

16 views 0 3
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