Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching linked issues and put them into a text field

Marvin Brand
Contributor
December 10, 2025

Hi there community ✌🏼,

I want an automation rule to fetch all linked issues and put them as a filtered and sorted list into a multi-line text field, when a new issue link is made or removed.

I used the trigger "When issue linked" (for "All Link Types") and then use an iterative smart value syntax to filter and sort just the issue types I want in the output list (see bellow ⬇️)

In principle this works, BUT I noticed that the trigger action only works if I set a new issue link with an outward link type like

  • blocks
  • duplicates
  • links
  • clones

and NOT is working for

  • is blocked by
  • duplicated by
  • linked by
  • cloned by

For refreshing the text field list when an issue link is removed, I use a separate automation rule with the trigger "When: Issue Link deleted" and the same action node bellow ⬇️

Note 1: I'm aware of this article "How to update the list of linked issues into a multiline text custom field.", but I want this rule only to work for the source issue and I have no need to also fill a text field on the destination issues. So assume I won't need a branch in my automation rule.

Note 2: Just in case, I already set the rule scope to all of the projects where the issue links are referring to

Master @Bill Sheboy, any ideas?

 

{{#issue.issuelinks.inwardIssue}}

  {{#if(key.startsWith("PA-"))}}

    {{key}}  ({{customfield_10034}})
  {{/}}

{{/}}

{{#issue.issuelinks.outwardIssue}}

  {{#if(key.startsWith("PA-"))}}

    {{key}}  ({{customfield_10034}})

  {{/}}

{{/}}

{{#issue.issuelinks.inwardIssue}}

  {{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"YYY")))}}

    {{key}}  ({{customfield_10034}})

  {{/}}

{{/}}

{{#issue.issuelinks.outwardIssue}}

  {{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"YYY")))}}

    {{key}}  ({{customfield_10034}})

  {{/}}

{{/}}

{{#issue.issuelinks.inwardIssue}}

  {{#if(and(key.startsWith("IMAGE-"), equals(issuetype.name,"XXX")))}}

    {{key}}  ({{customfield_10034}})

  {{/}}

{{/}}

{{#issue.issuelinks.outwardIssue}}

  {{#if(and(key.startsWith("IMAGE-"), equals(issuetype.name,"XXX")))}}

    {{key}}  ({{customfield_10034}})

  {{/}}

{{/}}

{{#issue.issuelinks.inwardIssue}}

  {{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"Design")))}}

    {{key}}  ({{customfield_10034}})

  {{/}}

{{/}}

{{#issue.issuelinks.outwardIssue}}

  {{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"Design")))}}

    {{key}}  ({{customfield_10034}})

  {{/}}

{{/}}

{{#issue.issuelinks.inwardIssue}}

  {{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"Master")))}}

    {{key}}  ({{customfield_10034}})

  {{/}}

{{/}}

{{#issue.issuelinks.outwardIssue}}

  {{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"Master")))}}

    {{key}}  ({{customfield_10034}})

  {{/}}

{{/}}

{{#issue.issuelinks.inwardIssue}}

  {{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"Adaption")))}}

    {{key}}  ({{customfield_10034}})

  {{/}}

{{/}}

{{#issue.issuelinks.outwardIssue}}

  {{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"Adaption")))}}

    {{key}}  ({{customfield_10034}})

  {{/}}

{{/}}

……………… and 3 more issue types ………………

 

1 answer

1 vote
Gideon Nolte _Eficode_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
December 10, 2025

Hi @Marvin Brand

working with issue links can be a real pain. Let me throw in an example to maybe clarify a thing or two.

Let's say we create a link on DEMO-1, linking it to DEMO-2. One could assume, that this would always make DEMO-1 the source issue and DEMO-2 the destination issue. Unfortunately that is not the case. As you noticed, your automation works fine for DEMO-1 --blocks--> DEMO-2 (automation triggers from DEMO-1) but DEMO-1 --is blocked by--> DEMO-2 results in the automation being triggered for DEMO-2 as it is the source issue.

-> Depending on the direction used, DEMO-1 could either be the source or destination issue. 

 

From your question, I assume, that there is some form of logic (e.g. the space/project or type of the issue/work item [...naming things, duh]) that clarifies the "actual direction" rather than the "technical direction" (inward/outward). 

 

That said, you would need an if/else condition, where you check whether your "technical" source issue ({{issue}}) is your "actual" source issue or whether your "technical" destination issue ({{destinationIssue}}) is your "actual" source issue. Does that make sense?

 

Let's sketch this:

If/Else

If condition: Work item field "Project" is one of <your "source" projects>

  > Edit work item

else:

  > Branch to "Related Work Item" (Destination work item)

  > > Edit work item

Here's a screenshot, for how this would look in practice.

Bildschirmfoto_10-12-2025_165640_demo-gideon.atlassian.net.jpeg

Each of the edits should than be fine with:

{{#issue.issuelinks}}
{{#inwardIssue}}
{{key}} {{customfield_10034}}
{{/}}
{{#outwardIssue}}
{{key}} {{customfield_10034}}
{{/}}
{{/}}

 

This way, the edit or comment is only done on the "actual" source issue, even if the linking is done from the other (technically "destination") side. 

Hope this clears up some things or might even be helpful :)

Best regards

Gideon from Eficode

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events