Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Scenario

Div
classtime

Estimated Time: 9 min

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 "Open" to "In Draft" 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:

Table plus
border0
heading0
multiplefalse
enableHeadingAttributesfalse
columnAttributesstyle="border:0;width=5%;",style="border:0;width=65%;",style="border:0;width=30%;max-width=30% !important;"
idsteps_table
enableSortingfalse
enableHighlightingfalse


Step 1

As a Jira Administrator or Workflow Administrator:

  1. Navigate to your workflow (ePub in this case).
  2. Edit your ePub workflow to create a draft version.
  3. Select the Post Functions tab.
  4. Add a Create Sub-task post function.


Image Modified


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 - "Create on Transition"
    • Create link direction - "Issue key to new issue"

.

Image Modified



Image Modified

Step 3

Define the regex used to

inspect the summary of

inspect the

parent

issue type and


the exact matching condition that is used to evaluate.

  1. Select the Conditions & Configuration tab.
  2. Enter "
%IssueType%
  1. %parent_issuetype%" in the Condition 1 field.
  2. Enter "Task" in the Regular expression pattern field.
  3. Select Exact matching condition, so we only create the sub-task
    when the issue type is "Task".
  4. Click the Add button to save your changes.

Image Modified


Image Modified

Step 4

  1. Remember to publish your workflow. We always recommend saving 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.