Create a Sub-task
The Create a sub-task post function creates a sub-task after an issue has been transitioned. For example, you have an issue type that requires approval from three different departments. You could use this post function multiple times to automatically create three sub-tasks, one for each approval, whenever an issue is moved through an Approval Required transition (or equivalent). If you want to further automate your workflow, you could also use the Transition Parent when all Sub-tasks are Resolved post function.
Subtask action
If a parent issue already has a matching sub-task, you can use the Subtask Action option to update the action of the matching sub-task rather than creating a new sub-task. For example, a department must approve the parent issue and the sub-task represents their approval. The department rejects the approval. They move the parent issue back a step in the workflow so more work can be done, and move the sub-task to Done. When the parent issue is ready for approval again and moved through the approval transition, instead of making a new sub-task for this department to complete, the sub-task previously marked as Done (or equivalent) is reopened.
If the Subtask Action is left blank a new sub-task is created every time the parent issue is moved through the selected transition.
Use this post function
You can now test to see if this post function works.