---
title: "Create a Linked Issue post function"
canonical: "https://support.appfire.com/space/JSUCLOUD/12518348/Create%20a%20Linked%20Issue%20post%20function"
format: markdown
---
> Macro (aura-html)

## Description

The Create a Linked Issue post function automatically creates a new issue that is linked to the original issue that triggered the post function. Any number of fields can be copied to the new issue and within the origin issue. 

> ℹ️ See [Workflow post functions](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518401) to learn how to add a JSU post function to a Jira workflow.

## Interactive demo

Follow the interactive demo setup below for an example of how to configure the Create a Linked Issue post function.

## Configuration

![image](media://39cfa399-cb36-4b25-a908-0b631bbd0965)

> ℹ️ [Infinite Loop Detection](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/256770940): An infinite loop can occur when executing the Create a Linked Issue post function. An infinite loop results in an endless cycle of issue creation and follow-up transitions following the triggering of the origin issue. When a loop is detected, JSU will stop the execution and log an execution failure.
> ℹ️ 
> ℹ️ When using post functions that create issues or follow-up transitions, consider the rule's outcome and the user permissions of your project teams. You can also use [preconditions](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518025) to restrict when rules are run to reduce the likelihood of causing an infinite loop.

> ⚠️ Post functions in JSU Cloud are executed asynchronously and a post function will be executed after the transition has been completed. If you use the Create a Linked Issue post function on a Create transition, the newly created issue will create another issue, which will create another issue, and so on. This results in an infinite loop and JSU will stop the execution to protect your instance.

### Precondition

> Macro (include)

### Copy attachments

<span style="color: #333333">Use it to define configurations to copy or move attachments to the newly created issue.</span>

<span style="color: #333333">You can choose Move Attachments added during Transition. The user then adds some attachments on the transition screen of the origin issue.</span>  
<span style="color: #333333">However, since they are moved to the newly created issue, it appears as if they added the attachments to the new issue. </span>

> ℹ️ ### Conditional copying attachments
> ℹ️ 
> ℹ️ Conditional copying attachment (controlled by custom field) is always checked only for the issue in transition, regardless of whether it is a source or destination.

## Initial mandatory values for the new issue

Use this section to configure the mandatory fields for an issue. These are basic Jira fields. Remember that your Jira configuration may have additional mandatory fields (set these using the Copy operation). 

Additionally, the summary will always be copied from the origin issue to the new issue. The reporter of the new issue will always be set to the user selected in the ‘Perform as User’ option. However, you might overwrite them later with [Copy to the New sub-function](https://appfire.atlassian.net/l/cp/oViikbxE).

### **Target project **

The target project can be set to:

- Inside same project: A new issue will be created in this same project
- Selected Project: A new issue will be created in the selected project.

### **This Issue will be related via**

The Create a Linked Issue post function allows you to create new issues that are connected not only with an issue link but instead in a parent / sub-task, as well as epic / issue in epic relation. See [Related Issues](https://appfire.atlassian.net/wiki/display/JSUCLOUD/Related+Issues) for more information.

### **Issue type**

Define the issue type of the new issue. The issue type you select here must be available in the target project.

### **Perform as User**

Perform As User is a configuration option in JSU post functions. It lets you choose the user who acts on the post function when it runs. When choosing a user account to run a post function, the specified user account must have the appropriate permissions to perform the actions, such as creating an issue or adding a comment.

> Macro (excerpt-include)



### Sub-functions

In JSU, you can define configurations to modify fields on the origin and new issue; this feature is only available for the Create a Linked Issue post function. 

- **Origin issue**: <span style="color: #000000">Issue that triggered the post function</span>
- **New issue**: <span style="color: #000000">Issue to be created by the post function, which was triggered on the origin issue</span>

![Diagram illustrating the outcomes of the post function when applied to a new issue and the origin issue.](media://ee46f6ac-ea47-474a-a775-8a493b97889b)

To add a sub-function:

1. Select **+ Add Configuration** to view the available operations.
2. Select **Add** for the required operation.
  The following operations are available:
  - **[Copy to New](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518106)**
  - **[Copy within Origin](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518295)**
  - **[Set](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518116)**
3. Configure the fields as required. See the[https://appfire.atlassian.net/l/cp/rpyvVZ8U](https://appfire.atlassian.net/l/cp/rpyvVZ8U) use case for an example setup.

### Organizing operations 

You can configure any number of configurations; they are executed sequentially.

- You can rearrange the configurations by dragging the line using the handle on the left.
- You can also disable a configuration by unchecking the toggle next to the Delete button. Your operation will remain on your configuration but will be ignored.

![Screenshot of the subfunctions as described on this page.](media://00751d56-f58f-4a83-b8ae-82aa22f1c521)

## Related pages

- [https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518186](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518186)