Linking issues through a link type "relates to" is ambiguous in Jira. Since there are two "relates to"'s, it is not possible to address related issues using Nunjacks code:
{% set links = issue | linkedIssues("relates to") %}
Two "relates to"'s are visible in the field "Link Type" in creating or editing Post Functions in Workflow administration.
Is it possible to merge these links into one or at least rename one of the "relates to", so that the above code addresses the correct issues?
Recommended Learning For You
Level up your skills with Atlassian learning
Learning Path
Get started with Jira Software
New to Jira Software? These short, self-paced courses will teach you what you need to know to get up and running quickly.
The Beginner's Guide to Agile in Jira
Learn what agile, kanban, and scrum are and how agile works in Jira Software.
Realizing the Power of Jira Reporting and Dashboards
Use out-of-the box reporting and dashboard capabilities to view and assess progress and bottlenecks within projects.