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

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 ?

8 answers

1 accepted

8 votes
Accepted answer

Have a look at this:

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

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!

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.

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.

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

Take a look below, search for JIRA Automation plugin smile

Like 1 person likes this

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


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

This is exactly the scenario we're using the JIRA Automation Plugin in Atlassian Support, see

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

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.



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

I am using the automation plugin (

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:

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 * * * * ?

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





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


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.

Hi Friends,

I am still waiting for your meaningful reply.


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:

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;

My filter uses in my script

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


Someone can help me?


Thanks in advance



Nobody could help me?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 15 hours ago in Jira

How you can achieve compact and easy-to-maintain workflows in your JIRA( Server)

This approach requires you to have the JIRA administrative rights. The main aim of this article is to help you achieve an organized, easy-to-maintain workflows in your JIRA instance thereby, reducin...

150 views 0 0
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