How to automate sub-task creation through labels by using Create on Transition
This article explains how sub-task creation can be automated based on the label field while creating an issue.
Instructions
In this case, the sub-task creation is automated on the create transition when labels are empty (or) to restrict the creation of sub-tasks based on the specific labels.
- Log in to Jira as an Administrator.
- Click on   Projects Project Settings
- Select the workflow that is associated with the project and click on Edit
- Click Add post function link and select Create Sub-task from the list and click Add
Configure the Create Sub-task post function as shown below with the JQL:
project = KPS AND key = %original_key% AND (labels != No_Subtasks OR labels is EMPTY)
Note: The above JQL will check for the issues and return results for the labels that are empty or the values not equals to No_Subtasks
- Publish the workflow.
- Create a sample ticket and test if the sub-task is created or not.