I am wondering there is a way to create sub-tasks automatically when issue created.
For example, I create a custom Standard Issue Type, XXX, and Sub-tasks Issue Type YYY and ZZZ. When I create a issue with type XXX, then two sub-tasks with respective issue type YYY and ZZZ will be created automatically.
One thing to consider is what happens if the parent issue is closed before all the subtasks are closed. I would recommend putting in a hook to prompt the user to address all the subtasks before closing the issue.
Just create a ticket called "template" (with all the necessary subtasks) and copy/clone it whenever creating new instances.
I found an easy solution using the add-on Script Runner - http://isolasoftware.it/2014/01/08/create-an-issue-in-jira-with-predefined-sub-tasks/.
You don't have to write any code but just setup the Post Function "Create a sub-task" in the Workflow editor.
You could so this easily using Jira Scripting Suite by using post function on issue creation transition on the project's workflow. Sample code: