# Replace Links

> **Note: Availability**
> This workflow uses functionality that is only available using the JavaScript Editor. This means that it is unavailable for editing in the Workflow Constructor.
>
>
>
> To learn more about this workflow, refer to the corresponding page in our [Developer Portal](https://www.jetbrains.com.cn/en-us/help/youtrack/devportal/Workflow-Replace-Links.html).

This workflow checks the list of linked issues when a new link type is added and replaces existing links to an issue if another link type is used.

| Name | @jetbrains/youtrack-workflow-replace-links |
| Auto-attached | no |
| Rules |      * Replace existing link when a link that uses a different link type is added to the same issue    |

## Use Case

This workflow prevents you from having two different link types for the same issue, which can create a conflict in your process.

## Rules

This workflow supports the following rule:

| Title | Description |
| --- | --- |
| Replace existing link when a link that uses a different link type is added to the same issue |       This on-change rule checks the list of linked issues for a link to an issue that is added as a link when the issue is updated. If the new link is duplicated by a link to the same issue with a different link type, the link is replaced with the link specified in the update.     |

