JIRA can be very efficient, but out of the box not real automation exists..
If the "earlier 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:
Atlassian CLI - my favorite, used in Making a free JIRA Scheduler
JellyScript
Groovy - supported by the Script Runner plugin - This should be very good
Interfacing with JIRA through webservices