Jira can be very efficient, but out of the box no real automation exists..
These days several other ways exist:
Almost standard now-a-days... (and You get it automatically in cloud)
Some Apps, like JSU App and Script Runner App offer parts of automation
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.
See Atlassian (old) samples at: https://confluence.atlassian.com/display/JIRA/Jelly+Escalation DEPRECATED
|Script Runner App
|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:
- Resets when JIRA is restarted
- Is relative from JIRA Start, so You can't schedule "at midnight"
Or create Your own....
Hiding Auto Transitions
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:
Create an "automationservices" group
Create a Transition that can only be done by users in that group:
Setting fields correctly:
If You encounter this error in the logs:
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
A real-life example:
I created an onComment Listener in Groovy, that transistet Issue when a Comment came in, a code snippet is:
This code is valid, but in the "Post Function" of the Transition was:
Hence, the script re-fired itself, which is not good...