Below are the two Jelly scripts used by Atlassian's support system to automatically close issues after a certain period. These Jelly scripts are then run with the built in Jelly Service.
Make an issue inactive
Close an issue
For more helpings of Jelly, see Jelly Examples.
Labels:







16 Comments
Hide/Show CommentsJul 31, 2008
Vincent Thoulé
Another way may be to implement an Auto Transition.
Our users required an Auto Closure of old Support Issues.
To do that, I implemented :
The Transition's comment may be entered in Workflow Transition as follow
Rgds
V.
Dec 02, 2010
Saran
Hi Vincent,
Am new to JIRA 4.1.I can't get you the details in the above link.
If you don't mind, could you please explain the steps in detail?
Thanks
Dec 02, 2010
Vincent Thoulé [Minyaa]
Hi Saran,
Kaamelot Plugin is no more supported, and has been replaced by Minyaa.
For Auto-Transition, see documentation here
Activity Condition are described here.
Make a try.
Vincent
Dec 03, 2010
Saran
Thanks for your valuable input Vincent.
Dec 03, 2010
Saran
Hi Vincent,
When I try to create new Service in JIRA 4.1 by giving this class name "com.atlassian.jira.service.AutoTransitionService"
Its showing the following error
Class [com.atlassian.jira.service.AutoTransitionService] was not found. Ensure that you have typed it correctly and it is in the classpath.
Please suggest.
Dec 03, 2010
Vincent Thoulé [Minyaa]
Hi Saran,
I suppose that yo have installed Minyaa!
Can you open an issue on http://www.minyaa.com/jira and provide more details (How you process the installation and log files)
Regards
Vincent
Aug 14, 2008
Mark Michaelis
Wondering why it is not stated here... just wrote as comment on the page Jelly Examples how to add these escalation scripts to your JIRA system. Thought it might be a good idea to state this here, too:
Oct 14, 2010
Anonymous
Hi,
Is this something that If I add to our JIRA system would enable us to apply to our workflows?
or it would apply to all the issues in the system?
thanks
Gill
Aug 18, 2008
amina
Do I need these two scripts in order to close an issue after 8 days being inactive?
If yes, how can I configure them do I need two services running?
Thanks
Aug 18, 2008
amina
I've found the solution I have to add the JIRA toolkit and add a custom field named "resolved issues" this field appears in the filter menu and allow me specify the delay of my filter
http://confluence.atlassian.com/display/JIRAEXT/JIRA+Toolkit
Thanks
Oct 21, 2008
Alexander E. Shevchenko
This Jelly script escalate issue to project lead in this case:
Mar 24, 2010
Royce Wong
Hi,
I added a custom field Root Cause (required) to my resolution screen and now my jelly script is throwing error on TransitionWorkflow.
It happens even if the root cause has already been specified by users at earlier stage of the workflow.
I searched for docs. related to TransitionWorkflow but looks like it doesn't has a parameter to set custom field:http://confluence.atlassian.com/display/JIRA/Jelly+Examples
This is what I want:
If root cause has already been specified, stay that way. If not, update it to the option "No Response".
How does one set/reference custom field in TransitionWorkflow?
Thanks.
Mar 25, 2010
Vincent Thoulé [Minyaa]
Hi Royce,
I have resolved such problem by extending the TransitionWorkflow tag.
See http://www.minyaa.com/documentation/latest/Features/ModuleTools/JellyTags.html#TransitionWorkflowExtended%20Tag
Regards
Vincent
Mar 26, 2010
Royce Wong
Thanks Vincent! Nice set of tools. I will check out the extended TransitionWorkflow tag..
May 05, 2010
Royce Wong
I have this condition in my workflow:
Naturally, I encountered errors with my jelly script when it tried to close a parent task with one or more non-closed sub-tasks.
<jira:TransitionWorkflow> Found workflow transition with name/id 'Inactive - Pending Closure' but that is not a valid workflow transition for the current state of issue 'ABC-23'. at com.atlassian.jira.jelly.tag.issue.TransitionWorkflow.getActionByName(TransitionWorkflow.java:437) at com.atlassian.jira.jelly.tag.issue.TransitionWorkflow.getActionId(TransitionWorkflow.java:161) bla... bla... bla...My question is, how can I catch that exception in jelly script? Which tag\s should I use around jira:TransitionWorkflow? I would like to output my own message instead of errors messages shown above. Thanks in advance.
May 05, 2010
Royce Wong
Reply to my own question:
Tried several other ways but this works.
Reference: http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/c/catch.html
Add Comment