Auto close jira tickets with status "resolved"

Igor Gerasimow February 3, 2015

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 https://confluence.atlassian.com/display/JIRA/Jelly+Escalation - 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">
resolved-slove
</core:set>
<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  -->
a
<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"/>
</core:forEach>
</jira:Login>
</JiraJelly>

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
java.io.PrintWriter@fc2bcb5

Please give me some advice about my problem
JIRA 6.3.14

LInux standalone instance

5 answers

1 vote
Andrei [errno]
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.
February 4, 2015

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

0 votes
Deleted user March 13, 2019

Hello,

I see several solutions here to autoclose resolved tickets. I need to inverse backlog stacked tickets... So my plan is to autoclose all tickets in status resolved without any answer after 14 calendar days.

So, what is the easiest and cheapest way to do so, please?

0 votes
Thomas Heidenreich
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.
February 3, 2015

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

0 votes
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 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.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2015

I can't see where you set $autoclose ?

Igor Gerasimow February 3, 2015

Sorry - but what for i should put $autoclose ?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2015

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)

Igor Gerasimow February 3, 2015

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"/>

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2015

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2015

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

Suggest an answer

Log in or Sign up to answer