Scenario
Div |
---|
|
Estimated Time: 9 min |
Each time a new issue is created that is of a certain issue type, you want to create a set of sub-tasks using the same summary as the parent issue.
Background
We can configure a Create Sub-task post function that processes when users create a new issue. For each instance of this transition, we inspect the issue type and if it is a "Story", we automatically create a set of sub-tasks. We inspect the issue type using one of Create on Transition's powerful Substitution Variables. In order to better identify subtasks, we prepend the parent issue summary with the name of the sub-task.
Steps
The following steps demonstrate how to configure Create on Transition, using regex inspection of the issue type and the Create multiple issues feature:
Table plus |
---|
border | 0 |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
columnAttributes | style="border:0;width=5%;",style="border:0;width=65%;",style="border:0;width=30%;max-width=30% !important;" |
---|
id | steps_table |
---|
enableSorting | false |
---|
enableHighlighting | false |
---|
|
Image RemovedImage Added | Step 1As a Jira Administrator or Workflow Administrator: Click the Cog icon to open the Settings menu and select Issues Click Workflows Navigate to your workflow and edit your workflow to create a draft version Select step 1 Select Create transition Select the Post Functions tab. Click Add post function Select Create Sub-task (Bob Swift) post function and add
| Image RemovedImage Added |
| Image RemovedImage Added | Step 2Within the Issue Fields screen: Select the Basics Fields tab Prepend "@entry@ - " to "%parent_summary%" in the Summary field to get the Sub-task's name in the Sub-task's Summary.
| Image RemovedImage Added |
| Image RemovedImage Added | Step 3Define the regex used to inspect the issue type of the parent issue and the exact matching condition that is used to evaluate. Also, configure the Create multiple issues field using a substitution variable. Select the Conditions & Configuration tab. Enter "%original_issuetype%" in the Condition 1 field. Enter "Story" in the Regular expression pattern field. Select Exact matching condition, so we only create the sub-tasks when the issue type is "Story". Scroll down until you find Create multiple issues. Enter "Development, Testing, Documentation". Click the Add button to save your configuration.
| Image RemovedImage Added |
| Image RemovedImage Added | Step 4Ensure to publish your workflow. It is always recommended to save a backup of the previous workflow when prompted. Create an issue of type "Story". Validate that the new sub-task issues were created and that it contains the name prepended before the parent summary.
|
|
|