Create subtask for specific issue types

Create subtask for specific issue types

Scenario

Each time a new issue is created that is of a certain issue type, you want to create a sub-task using the same summary as the parent issue.   

Background

This scenario uses an example ePub workflow that helps teams coordinate the publication of electronic books. We can configure a Create Sub-task post function that processes when users transition issues from the "To Do" to "In Progress" steps. For each instance of this transition, we inspect the issue type and if it is a "Task", we automatically create a new sub-task issue linking it back to the parent issue. We inspect the issue type using one of Create on Transition's powerful Substitution Variables.

Steps

The following steps demonstrate how to configure Create on Transition, using regex inspection of the issue type and applying the proper linkage between issues:

Step 1

As a Jira Administrator or Workflow Administrator:

  1. Click the Cog icon to open the Settings menu and select Issues

  2. Click Workflows

  3. Navigate to your workflow and edit your workflow to create a draft version

  4. Select Create transition

  5. Select the Post Functions tab.

  6. Click Add post function

  7. Select Create Sub-task (Bob Swift) post function and add

Step 2

Within the Issue Fields screen:

  1. Select the Links tab.

  2. Select the following from the respective list of available options:

    • Create Link - "Original issue key"

    • Create link type - "Relates"

    • Create link direction - "Issue key to new issue"

Step 3

Define the regex used to inspect the summary of the parent issue and the exact matching condition that is used to evaluate.

  1. Select the Conditions & Configuration tab.

  2. Enter "%IssueType%" in the Condition 1 field.

  3. Enter "Task" in the Regular expression pattern field.

  4. Select Exact matching condition, so we only create the sub-task
    when the issue type is "Task".

  5. Click the Add button to save your changes.

 

Step 4

  1. Ensure to publish your workflow. It is always recommended to save a backup of the previous workflow when prompted.

  2. Create an issue of type "Task".

  3. Validate that the new sub-task issue was created and that it contains a link back to
    the originating issue.

 

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.