TableTransformer Overview of all required artefacts
Asked by Alexander Mitte:

Dear Community,

for a long time now I am searching a solution for my problem:

* I have for example a JQL that returns Defects.
  * These Defects are linked through the "is required by" relationship to Features.
  * In my TableTransformer I cannot access only "is required by" Features, but only a list of ALL artefacts linked to these Defects through the "Linked Issues" field.

I want to create an overview with the Defects and all "is required by" Features of **each individual Defect**.

* I know that you could generate a second Jira Macro and use "issuefunction in LinkedIssuesOf('issuetype = Defect', 'is required by') to generate a list of Featuers. Afterwards you could split the Linked Issues list and join the two queries together.
* However this does not work for my use case, as it could be that Defect and Feature is also linked through for example "Created by", which would mean that this Defect and Feature are still merged (because the Feature is in the Linked Issues field), but they are actually not connected through "is required by".

I have not found a solution yet for this problem (I dont even know if this is even possible), but as this use case is often SOOO often at our company, it would be awesome to find a suitable solution.

Thanks in advance :)


Answers:
author: Roma Bubyakin
body: Hello [@Alexander Mitte](/t5/user/viewprofilepage/user-id/5555254)

I'm afraid that, you will need a custom solution for such a custom request.  
I can propose to try our [User Macro for Confluence Cloud](https://marketplace.atlassian.com/apps/1232013/user-macro-for-confluence-cloud)

As I understand, you would like to have something like the following:

![Macro.png](https://community.atlassian.com/t5/image/serverpage/image-id/338613iADCF0C5113123666/image-size/large?v=v2&px=999 "Macro.png")

This is a custom User Macro that represents **Defects with their Features** *(and additionally Issue Types, links, priority, and images).*

Here is the board which was the source for the macro:  
![Board.png](https://community.atlassian.com/t5/image/serverpage/image-id/338614i699D6CA569242EEA/image-size/large?v=v2&px=999 "Board.png")

Everything you see is fully customizable and you can do much more if needed.  
For instance, preselecting project or linkage type before inserting the macro with User Parameters.

The template for that is the following:

```
## The JQL
#set($jql = "project = TEST AND type = Defect ORDER BY created DESC")

## Making a request and set result into $defects var
#set($defects = $JiraManager.get("/rest/api/3/search?jql=$jql").issues)

## Create an Issue URL variable for simplicity
#set($jiraUrl = $StringUtils.replace($baseUrl,"/wiki",""))
#set($issueUrl = "$jiraUrl/browse")

## Table header
<table class="aui aui-table-list">
  <thead>
    <tr>
      <th>Defect</th>
      <th>Features</th>
      <th>Issue Type</th>
    <tr>
  </thead>
  <tbody>

## Table body
#foreach ($defect in $defects)
    <tr>
      <td colspan="2">
        <img src="$defect.fields.priority.iconUrl" title="$defect.fields.priority.name" height=15px>
        <a href='$issueUrl$defect.key'>$defect.key</a> 
        $defect.fields.summary
      </td>
      <td>
        <img src="$defect.fields.issuetype.iconUrl">
        $defect.fields.issuetype.name
      </td>
    </tr>
  ## Internal loop through linked issues 
  #foreach ($link in $defect.fields.issuelinks)
    ## Includes only "is required by" linkage
    #if ( $StringUtils.equals($link.type.inward, "is required by") )
    <tr>
      <td></td>
      <td>
        <img src="$link.inwardIssue.fields.priority.iconUrl" title="$link.inwardIssue.fields.priority.name" height=15px>
        <a href='$issueUrl$link.inwardIssue.key'>$link.inwardIssue.key</a>
        $link.inwardIssue.fields.summary
      </td>
      <td>
        <img src="$link.inwardIssue.fields.issuetype.iconUrl">
        $link.inwardIssue.fields.issuetype.name
      </td>
    </tr>
    #end
  #end
#end

## Table footer
</tbody>
</table>
```

As always, you can rely on our support with creating new macros.

Regards,  
Roman, CEO of Wombats Corp


Tags: cloud

confluence-cloud

jira

jql

tabletransformer