---
title: "Create multiple issues for each fix version"
canonical: "https://support.appfire.com/space/CSOT/68747997/Create%20multiple%20issues%20for%20each%20fix%20version"
format: markdown
---
> Macro (aura-html)

# Scenario

When an issue transitions between a certain step, you would like to create multiple issues, one for each fix version specified within the original issue.

## Background

<span style="color: #333333">This scenario uses an example </span>[ePub workflow](https://bobswift.atlassian.net/wiki/download/attachments/443875364/ePub-workflow-diagram.png?version=1&modificationDate=1521470932712&cacheVersion=1&api=v2)<span style="color: #333333"> that helps teams coordinate the publication of electronic books. We want to add a </span><span style="color: #333333">*Create Issue*</span><span style="color: #333333"> post function that processes when users transition issues from the "To Do" to "In Progress" steps. Using the "Create multiple issues" feature of </span><span style="color: #333333">**Create on Transition**</span><span style="color: #333333">, we can provide a </span><span style="color: #333333">[Substitution Variable](https://appfire.atlassian.net/wiki/spaces/CSOT/pages/68749234)</span><span style="color: #333333"> of "%original_fixed_versions%". This allows us to create one issue for each of the fix versions associated with the issue being transitioned. Each issue created contains a link back to the original issue. In order to better identify which fixed version the issues belong to, we prepend the issue summary with the fix version.</span>

## Steps

<span style="color: #333333">The following steps demonstrate how to configure Create on Transition using the Create multiple issues feature:</span>

|  |  |  |
| --- | --- | --- |
| ![image](media://f07c1fd6-f6e9-48f1-9b5e-b8d3cc389582) | ## Step 1<br>As a Jira Administrator or Workflow Administrator:<br>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 the transition
5. Select the *Post Functions* tab.
6. Click* Add post function*
7. Select *Create Issue (Bob Swift)* post function and add | ![image](media://55848146-4d17-4da0-b045-bd1cab025d80) |
| ![image](media://dbf6c8f6-03c4-475c-9d1b-d49e0fcc30b6) | ## Step 2<br>1. Select the *Basics Fields* tab.
2. Prepend *"@*entry@ - " to "%parent_summary%" in the *Summary* field.
3. Select the *Links* tab.
4. Select the following from the respective list of available options:
  - 
    - *Create Link* - "Original issue key"
    - *Create link type - *"Relates"
    - *Create link direction - *"New issue to issue key" | ![image](media://8c736c22-6182-47ff-9b7c-0582ff6f9732) |
| ![image](media://102028ca-ade2-44fa-8461-ee64fee2a7ac) | ## Step 3<br>Define the regex used to inspect the label of the issue and the exact matching condition that is used to evaluate.<br>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 "Story".
5. Enter "%original_fixed_versions%" in the *Create multiple issues* field
6. Click the **Add** button to save your changes. | ![image](media://4fbde3d0-ea14-44a4-980b-396e73e89d89) |
| ![image](media://65e74fac-370c-4422-8e1f-a12a04766101) | ## Step 4<br>1. Ensure to publish your workflow. It is always recommended to save a backup of the previous workflow when prompted.
2. Create an issue and assign a set of fixed versions.
3. Transition the issue to trigger your post function.
4. Validate that the new issues (one per fixed version) were created in the proper project and that each one contains a link back to the originating issue. |  |

## More ideas around this tutorial:

- For each new hire, automatically create an issue for each application or resource the user needs.
  - In step 3 above, just use the application/ resource custom field substitution variable
- For each new product, automatically create all the marketing tasks
  - In step 3 above, just enter the list of marketing tasks as comma-separated-values