JIRA can be very efficient, but out of the box no real automation exists..
In the "good old days", the only way to do this was JellyScript - a horrible XML implementation of scripting, java wrapped in XML..
These days several other ways exist:
Script/Type | Comments |
---|---|
Atlassian CLI | My favorite tool , used in Making a free JIRA Scheduler - and can be "integrated via shell calls from script, powershell and other programming languages. As it is java based, it is virtually platform independant, the main downside is that is is slow. |
JIRA JellyScript | See Atlassian (old) samples at: https://confluence.atlassian.com/display/JIRA/Jelly+Escalation |
Groovy | Supported by the Script Runner plugin - This should be very good, made by Jamie Echlin See sam samples at https://jamieechlin.atlassian.net/wiki/display/GRV/Miscellaneous+Groovy+Scripts |
REST API | Interfacing with JIRA through webservices - REST, The SOAP and XML-RCP is deprecated |
The internal JIRA Scheduler implemented in Services really sucks - only setting is a "pr. minute" count called delay, and this:
Hence, use another Scheduler if the timing must be right, like tweaking my Making a free JIRA Scheduler or buy TheScheduler Plugin
Or create Your own....
Often, You want the Automation and the User to perform the same transitions, or the Automation to do extra "invisible" stuff, - This can be tricky, also because any validations not handled in the transitionscript will cause a fail:
2014-05-05 22:46:30,674 QuartzScheduler_Worker-3 INFO ServiceRunner CloseResolvedIssues [jira.jelly.service.JellyService] JellyService.run 2014-05-05 22:46:30,803 QuartzScheduler_Worker-3 ERROR anonymous CloseResolvedIssues [jira.jelly.service.JellyService] file:/pack/jira-jelly/support-closeresolved.xml:48:125: <jira:TransitionWorkflow> The following problems were found: customfield_12922: ITIL Tag is required. org.apache.commons.jelly.JellyTagException: file:/pack/jira-jelly/support-closeresolved.xml:48:125: <jira:TransitionWorkflow> The following problems were found: customfield_12922: ITIL Tag is required. at com.atlassian.jira.jelly.tag.JellyUtils.processErrorCollection(JellyUtils.java:24) at com.atlassian.jira.jelly.tag.issue.TransitionWorkflow.doTag(TransitionWorkflow.java:133) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247) |
Create an "automationservices" group
Create a Transition that can only be done by users in that group:
Hidden:
Setting fields correctly:
If the Screen is like above (None), setting field will not work (stupid), and the log will show:
This is typically due to the script is a copy/similarity of https://confluence.atlassian.com/display/JIRA/Jelly+Escalation and the line:
Setting a field on the Jelly "jira:TransitionWorkflow" requires a screen with the field, therefore - set it in the Post Function |