TableTransformer Overview of all required artefacts

Alexander Mitte
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 29, 2024

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 :)

1 answer

0 votes
Roma Bubyakin _Wombats Corp_
Contributor
July 29, 2024

Hello @Alexander Mitte 

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 

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

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

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events