How can I automatically close issues?

Tony Brandner November 11, 2015

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

1 vote
Nick Muldoon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 8, 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
Co-CEO, Easy Agile

 

Easy Agile, creators of Agile User Story Maps for Jira, Agile Roadmaps for Jira, Personas for Jira, and Scaled Agile Programs for Jira

 

Steve Behnke [DiscoverEquip.com]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 8, 2016

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

1 vote
Henrique Freitas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2015

Hi Tony,

 

Unfortunately it is not possible in a Cloud instance. sad

Cheers,

 

Henrique Freitas

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2015

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
Steve Behnke [DiscoverEquip.com]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2015

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.

Suggest an answer

Log in or Sign up to answer