This article explains how sub-task creation can be automated based on the labels field while creating an issue.
Instructions
In this case, the sub-task creation is automated on the create transition when labels are empty (or) when specific label names are entered by the user.
- Login 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 and select Create Sub-task from the list and click Add
- Configure the Create Sub-task post function as shown below with the JQL as
project = KPS AND key = %original_key% AND (labels != No_Subtasks OR labels is EMPTY)
- Publish the workflow.
- Create a sample ticket and test if the sub-task is created or not.