YouTrack Standalone 2017.1 Help

Replace Links

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.

File Namejetbrains-youtrack-replaceLinks
RulesReplace existing link with adding link if both have similar ends (stateless)

Use Case

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


This 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.

Replace existing link with adding link if both have similar ends

rule Replace existing link with adding link if both have similar ends when duplicates.added.isNotEmpty || relates to.added.isNotEmpty || depends on.added.isNotEmpty || subtask of.added.isNotEmpty { for each duplicate in duplicates.added { relates to.remove(duplicate); depends on.remove(duplicate); is required for.remove(duplicate); subtask of.remove(duplicate); parent for.remove(duplicate); is duplicated by.remove(duplicate); } for each related in relates to.added { duplicates.remove(related); is duplicated by.remove(related); depends on.remove(related); is required for.remove(related); subtask of.remove(related); parent for.remove(related); } for each subtask in subtask of.added { relates to.remove(subtask); depends on.remove(subtask); is required for.remove(subtask); duplicates.remove(subtask); is duplicated by.remove(subtask); parent for.remove(subtask); } for each depended in depends on.added { relates to.remove(depended); duplicates.remove(depended); is duplicated by.remove(depended); subtask of.remove(depended); parent for.remove(depended); is required for.remove(depended); } }
Last modified: 18 April 2017