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

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

0 votes

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 votes
Joseph 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 Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

879 views 3 9
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