The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Auto close tickets using Script Runner

VenugopalY
Contributor
May 3, 2015

My system (JIRA 5.2)configured with jelly script for Auto close tickets that have been resolved in state for  30 days with email notification to reporter. Jelly script will change/update Resoled state to Closed with custom message to reporter after 30 days (as per filters) 

How to achieve same function with Script Runner? on JIRA 6.4.2

Please advise.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Udo Brand
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 Champions.
May 3, 2015
Deleted user
May 4, 2015

I recommend this

VenugopalY
Contributor
May 4, 2015

Script Runner with Escalation service seems to be working. For add comment section comment treating as single line. How to make below comment as paragraph (line by line) issueInputParameters.setComment('Hello, This ticket has been in resolved state for 30 days without an update. This ticket will be automatically moved to closed state. If this issue has not been resolved satisfactorily, clone this to a new ticket. Thank you,JIRA Administrator.') Example: Hello, This ticket has been in resolved state for 30 days without an update. This ticket will be automatically moved to closed state. If this issue has not been resolved satisfactorily, clone this to a new ticket. Thank you, JIRA Administrator. Regards, Venu

Udo Brand
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 Champions.
May 5, 2015

see Jamies answer. https://answers.atlassian.com/questions/108151/forcing-a-linebreak-issue-comment-groovy And feeld free to accept this answer.

0 votes
Simon Kegel //SEIBERT/MEDIA
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 Champions.
May 4, 2015

Hey Venugopal,

you should set up a filter for your purpose -
f.e.: updated <= startofday(-30d) and status = resolved 

This filter you can use in the Escalation Service of ScriptRunner.
You find the Service in the Built-In Script section.

There configure your escalation service - put your filter query in there and select the transition of your workflow you want to be  performed - set your wanted interval in minutes or as cron expression and you're done smile

Greets
Simon