Auto close jira tickets with status "resolved"

Hello ladies and gents - I need to be able to auto close the tickets in "REOLVED" status within 24 hours. I was found this solution - my script below


<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib" xmlns:core="jelly:core" xmlns:log="jelly:log">
<jira:Login username="USER" password="PASSWORD">
<log:info>Running Close issues service</log:info>
<!--  Properties for the script  -->
<core:set var="comment">
<core:set var="workflowStep" value="RESOLVED"/>
<core:set var="workflowUser" value="user name - who make comment"/>
<core:set var="search filer name" value="search filer ID"/>
<!--  Run the SearchRequestFilter  -->
<jira:RunSearchRequest filterid="${auto_close}" var="issues"/>
<!--  Iterate over the issues  -->
<core:forEach var="issue" items="${issues}">
<log:warn>Closing inactive issue ${issue.key}</log:warn>
<jira:TransitionWorkflow key="${issue.key}" user="${workflowUser}" workflowAction="${workflowStep}" comment="${comment}" resolution="Customer Timeout"/>

But when i start it in jelly runner console i'l get this exception

Exception: org.xml.sax.SAXException: could not find namespace with prefix core

Please give me some advice about my problem
JIRA 6.3.14

LInux standalone instance

4 answers

1 vote
Andrei [errno] Community Champion Feb 04, 2015

JIRA Automation plugin replaced all our Jelly scripts. Would highly recommend staying away from Jelly for future compatibility

0 vote

I can't see where you set $autoclose ?

Sorry - but what for i should put $autoclose ?

You need to set it to the ID of the filter you want to run to find the issues. At the moment, you're not setting it in your script, and I think that might be causing a parse error (Sorry, I wrote $autoclose, it's actually $auto_close in your script)

If $autoclose - it is the name of search filer - then it is in my script <core:set var="search filer name" value="search filer ID"/>

Er, no, that's setting a variable that you never use in the script. Also, you need to use the ID of the filter, not the name.

p.s. Andrei's point is an excellent one...

0 vote
Joe Pitt Community Champion Feb 03, 2015

If you're going to autoclose them why not just change the workflow so resolving them closes them? Seems like a lot less work. If the 24 hours is to allow folks to check them for correctness it isn't really a realistic time frame in my experience. You could allow them to reopen if they say it was resolved incorrectly.

Don´t use a JellyScript - the JellyRunner won´t be included in the next JIRA version. Use the escalation service from ScriptRunner or The Scheduler Plugin...

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 ...

3,345 views 14 20
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