The epics in our JIRA project have several sub-tasks and we wish to display the sub-task's statuses along some other fields in a table view. Since this cannot be accomplished by JIRA's built-in filters, I came across Confluence's Table Transformer macro.
So the data looks basically as follows:
Table T3 (filter) epics:
+--------+------------------------+
|Key | Sub-Tasks |
+--------+------------------------+
| MCR-1 | MCR-10, MCR-11, MCR-12 |
+--------+------------------------+
| MCR-2 | MCR-20 |
+--------+------------------------+
| MCR-3 | MCR-30, MCR-31 |
+--------+------------------------+
Table T1 (filter) for QM sub-tasks:
+--------+--------------+
|Key | Status |
+--------+--------------+
| MCR-10 | DONE |
+--------+--------------+
| MCR-20 | NOT RELEVANT |
+--------+--------------+
| MCR-30 | OPEN |
+--------+--------------+
Table T2 (filter) for E3 approvals:
+--------+--------------+
|Key | Status |
+--------+--------------+
| MCR-11 | DONE |
+--------+--------------+
| MCR-31 | NOT RELEVANT |
+--------+--------------+
If I now add all three tables into the table transformer macro and edit the SQL query as follows:
SELECT T3.'Key' AS 'MCR-Key',
T1.'Status' AS 'QM Status',
T2.'Status' AS 'E3 Approval'
FROM T3
LEFT JOIN T1 ON (T1.'Key' IN T3.'Sub-Tasks')
LEFT JOIN T2 ON (T2.'Key' IN T3.'Sub-Tasks')
then all rows are listed, but I get only the status of the first epic's sub-tasks:

So basically I would like to know how to join multiple tables with comma-separated values.