How to automatically close issue if there has been no activity for last 2 weeks

gauravkohli January 16, 2012

We have a workflow in which we resolve a issue and then it enters "Resolved" status and after that it has two transition possible "verification passed" or "verification failed" which the end user should perform. But if the user do not reply for 2-3 weeks, I just want the issue should automatically transition to the closed status and put in a appropriate comment.

anyone has any idea about this ?

10 answers

1 accepted

11 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
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.
January 16, 2012

Have a look at this: http://confluence.atlassian.com/display/JIRA/Jelly+Escalation

gauravkohli January 16, 2012

Thanks Jobin, I was exactly looking for what Atlassian Support team does for their project.

Najmul Khan April 6, 2014

Hi Jobin,

If you see there is one attribute name as password, I dont want to use the password attribute, is this will be work and I want to run this through service.

Please give your fruitful answer for this because I want to do this with service after every 12 hrs.

Thanks in advance!

Jobin Kuruvilla [Adaptavist]
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.
April 7, 2014

You can try to do it in a JIRA service. But you will have to use the SearchService to find issues that are closed in last 2 weeks and then use IssueService to transition them to Closed state.

Najmul Khan April 7, 2014

Hi Jobin,

Let me tell you what I did till now, I wrote one Jelly (which contain the user name and password attribute) to close the resolve ticket and configure the Jelly in the service. Now I am running the services after every 12 hr. So, ticket is getting close properly.

As you know, Now I am passing the user name and password both in Jelly to close the ticket but I dont want to use the password attribute in Jelly for some of the security reason of our company. Whenever I am trying to run the Jelly without the password attribute through service the code is not running.

Hope you will understand my issue. Please share some workaround with me.

Aaron Bauman January 27, 2016

"Jelly Escalation" has been deleted. What is the current state of this solution / workaround?

Matej K
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 27, 2016

Take a look below, search for JIRA Automation plugin smile

Like Jira Xpi Support likes this
Aaron Bauman January 28, 2016

Thanks Matej - should have clarified that i need a solution for OnDemand / Cloud

3 votes
Alexander Fedtke November 16, 2016

I am using the automation plugin (https://marketplace.atlassian.com/plugins/com.atlassian.plugin.automation.jira-automation-plugin/server/overview

for that purpose e.g. Ticket longer then 10d in IN QA auto. close

project in ("Design UI Team") AND status = "In QA" AND status changed to "In QA" before -10d and updated <= -10d

 

Here the full details:

Trigger
TypeJQL Filter Trigger
JQL expressionproject in ("Design UI Team") AND status = "In QA" AND status changed to "In QA" before -10d and updated <= -10d
Limit results
CRON schedule0/5 * * * * ?
Actions


TRANSITION ISSUE ACTION
Workflow TransitionDT WFv3: Done (61)
Disable notification for this transition?No
Skip condition checkingNo
Transition fieldsresolution=6
COMMENT ISSUE ACTION
CommentTicket closed because it was longer than 10 days "In QA".
Comment VisibilityViewable by All Users
Send notification?Yes

 

 

 

 

1 vote
Tom Rehulka November 16, 2016

Hi Gaurav,

I would:

  1. Create SLA Metric to start counting when issue entered Resolved.
  2. Create Automation to check if this SLA Metric reached 3 weeks. Then Transition the issue.

Cheers

 

SABVARX June 2, 2017

Hi Tom Rehulka,

the solution you describe sounds straightforward, but actually I tried to configure that, but the issue does not get transitioned.

Did you ever get it working?

Can you please clarify in more detail how you configured the SLA.

Thank you!

Cheers, Sabrina

dmartinm March 12, 2019

SLA

start when Entered Status: Resolved and stop when Entered Status: Closed

 

on Goals I put 40h for all issues remaining ...

AUTOMATION

then automation on SLA time remaining: <your sla name task> is Breached and then Transition issue: close

 

regards

1 vote
Najmul Khan April 9, 2014

Hi,

I am going to achieve this through Jira Automation Plugin. Hope so it will work.

Matej K
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 19, 2014

This is exactly the scenario we're using the JIRA Automation Plugin in Atlassian Support, see https://blogs.atlassian.com/2014/02/atlassian-support-uses-jira-automation-plugin/

Alexander Fedtke July 7, 2016

Which event trigger do you use for issues which are e.g. longer than 10d in the status "IN QA"?

Deleted user March 14, 2019

Are we talking about a free plugin? I see there are PRO and LITE versions of that plugin, is the LITE for free and does it do the job?

0 votes
Johannes Rudolf April 16, 2020

Script Runner for Jira does that job easily too.

Simply use the "Escalation Service" in order to create a JQL based scheduled job and  define when to run via cron expression. You may place a comment too. And use a service user to execute the job. Done.

Give it a try when have this powerful plugin installed upon your instance. ;-) 

0 votes
Deleted user April 26, 2019
0 votes
Cedric_DEVAUX November 18, 2014

Nobody could help me?

0 votes
Cedric_DEVAUX November 13, 2014

Hi,

My company use JIRA 5.2.11 so I can't use JIRA automation plugin and we want to close automatically resolved tickets after 7 days without reopening and only in a specific JIRA project (Service Desk)

I use the Jelly script describe here: http://confluence.atlassian.com/display/JIRA/Jelly+Escalation

It works fine smile but works too fine because the script close all resolved tickets in all JIRA project.

Below my script

&lt;JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib" xmlns:core="jelly:core" xmlns:log="jelly:log" &gt;
&lt;jira:Login username="My_user" password="My_pwd"&gt;
    &lt;log:info&gt;Running Close issues service&lt;/log:info&gt;
    &lt;!-- Properties for the script --&gt;
    &lt;core:set var="comment"&gt;Dear User,
This issue has not been updated for 5 business days and will be Closed.
 
If this issue has not been completed please reopen a new issue and we will do our best to help you as soon as we can.
 
Thank you,
 
Vallourec Service Desk&lt;/core:set&gt;
    &lt;core:set var="workflowStep" value="701" /&gt;
    &lt;core:set var="workflowUser" value="SVC-CT.JiraToConflue" /&gt;
    &lt;core:set var="filter7Days" value="17560" /&gt;
 
    &lt;!-- Run the SearchRequestFilter --&gt;
    &lt;jira:RunSearchRequest filterid="${filter7Days}" var="issues" /&gt;
 
    &lt;!-- Iterate over the issues --&gt;
    &lt;core:forEach var="issue" items="${issues}"&gt;
        &lt;log:warn&gt;Closing inactive issue ${issue.key}&lt;/log:warn&gt;
        &lt;jira:TransitionWorkflow key="${issue.key}" user="${workflowUser}" workflowAction="${workflowStep}" comment="${comment}" resolution="Done"/&gt;
    &lt;/core:forEach&gt;
&lt;/jira:Login&gt;
&lt;/JiraJelly&gt;

My filter uses in my script

project = "Service Desk" AND status = Resolved AND resolved &gt; -7d

 

Someone can help me?

 

Thanks in advance

 

Cedric

0 votes
Najmul Khan April 7, 2014

Hi Friends,

I am still waiting for your meaningful reply.

0 votes
François Manchon January 16, 2012

Write a Jelly script to close the issues matching your criteria, and schedule the script to run every night.

Najmul Khan April 6, 2014

Hi,

In Jelly, There is an attrbute name as Password, I dont want to give password for security purpose, If I am running the code without password then it give the error. Is there any alternate solution or work around to come out from this issue.

Suggest an answer

Log in or Sign up to answer