Jira automation craate table of linked issues
Asked by Alan Alder:

I'm trying to create a table within another field (acceptance criteria) using jira automation to display my linked issues however I can't get each issue to show on a new row.

![Screenshot_20240712_224554.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/335396i4A14B1F09B5A0BCA/image-size/large?v=v2&px=999 "Screenshot_20240712_224554.jpg")

![Screenshot_20240712_224536.jpg](/t5/image/serverpage/image-id/335394iFD2EA6DE47FB3E96/image-size/large?v=v2&px=999 "Screenshot_20240712_224536.jpg")


Answers:
author: Bill Sheboy
body: Hi [@Alan Alder](/t5/user/viewprofilepage/user-id/5542876) -- Welcome to the Atlassian Community!

You are iterating over the issuelinks *inside of the table row formatting*. Try moving the iterator outside of the row's conditional check.

For example:

```
*Delivers Tickets*
||*Ticket*||*Status*||
{{#issue.issuelinks}}{{#if(equals(type.inward,"delivers"))}}|{{inwardissue.key}}|{{inwardissue.status.name}}|{{/}}
{{/}}
```

Kind regards,  
Bill

comments: author: Alan Alder
body: Thanks [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) it's now put the record on the same row but different columns. Is there away to get them on different rows instead of columns

![Screenshot_20240712_233230.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/335397i3A9129F63522A9CE/image-size/large?v=v2&px=999 "Screenshot_20240712_233230.jpg")


author: Bill Sheboy
body: Oops...missing a newline after the conditional to trigger the new row. I updated the earlier post.


author: Alan Alder
body: [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) amazing thank you


author: Alan Alder
body: [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) if I wanted to show both delivers and depend on linked issues and then put the link type in the table how would I go about doing that?


author: Bill Sheboy
body: You could use the OR() conditional syntax, with two equals() calls, testing the different values. Then add an additional column for the link type in the table.

<https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#or>


author: Alan Alder
body: [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) sorry to be a pain I'm still having issues keep getting errors. The delivers is an inward type and the depends on is an outward type.

![Screenshot_20240713_105408.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/335423i5356A976548ADA28/image-size/large?v=v2&px=999 "Screenshot_20240713_105408.jpg")


author: Bill Sheboy
body: The or() clause needs to wrap around the equals() tests for each type, as the equals() is what performs the test:

```
{{#if(or(equals(field, valueA), equals(field, valueB)))}}display when true{{/}}
```

**Please note well** : you are now mixing *link directions* in the expression, inward and outward links. And so the logic to include the type, key, and status will need to be dynamic to use the correct one: inward versus outward.

I encourage you to experiment and get each type, "delivers" and "depends on", working separately and then try combining them.


author: Alan Alder
body: [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) how do I add the dynamic elements as I'm still getting errors with everything I try


author: Bill Sheboy
body: Please post the expression you are trying. That will help to diagnose what is happening.

As an alternative to the dynamic elements, you may instead repeat the conditional blocks inside of the iterator.

```
{{#issue.issuelinks}}
conditional block to test for "delivers", and add a row
conditional block to test for "depends on", and add a row
{{/}}
```

This will also handle the case of adding the same issue twice in case it has multiple links to the same issue, but with different types.


Tags: jira-unknown-hosting-type

unknown-hosting-type