How to create a sub-task based on custom field value using Create on Transition app
Overview
This article explains how to create a sub-task based on a custom field value on the parent issue using the Create on Transition app.
Instructions
Add a post-function in the workflow associated with the parent issue. To create the post function,
- Log into Jira as an Administrator
- Go to the desired Project > project's Workflow > respective post function
- If the post function already exists then proceed to step:# 5.
- If there is no post function configured then follow the steps from step# 3.
- Edit the workflow and go to the transition, where you want to add the Create on Transition post function.
- Click Add post function and select Bob Swift's Create Sub-task post function.
- The post function will have the following condition and regex value along with the other values.
Condition value as %original_customfield_11002%, %original_customfield_11001% where 11002 and 11001 are the custom field ids.
Regex pattern will contain the value, Here, for example, Yes|No for the first condition and UAT|Production for the second condition. - Click Update to save the settings.
- Publish the Workflow.
- Go to any Jira Issue and provide the custom field values Production and Yes and perform the transition. After the transition happens, a sub-task will be created as shown below.
- Test the post function creation in a test environment first before implementing it in a production environment.