JIRA issue/filter macro, display 1 field per line for sub-tasks
Asked by ray scott:

I am trying to shoe ONE field per row/line in confluence when executing the JIRA Issue/Filter.

I have a Task that has many Sub-Tasks, but i have a requirement to display each field in the sub-task on separate lines. Is there a way I can edit the macro to make data display on separate lines? Or another possible solution?


Answers:
author: Ste Wright
body: Hi [@ray scott](/t5/user/viewprofilepage/user-id/4668886)

Could you provide a screenshot or drawing of what you're trying to achieve?

I'm struggling to visualise the *Sub-task fields on separate line*requirement.

Ste

comments: author: ray scott
body: Imagine a Parent "Task" and 3 "Sub-tasks", I am looking to display the TASK using a standard macro JIRA issue/filter, with the data in one row showing multiple heading columns. However the "Sub-Tasks" are required to display on field at a time, per row see below:

Task = USA and Sub-tasks =include New York, Texas and Ohio

The report will look like this:

Country Population Average Age

USA 360M 71

**State**

New York

**Population**

7M

**Average Age**

70

**State**

Texas

**Population**

9M

**Average Age**

74

**State**

Ohio

**Population**

2M

**Average Age**

79

Thanks for any help.

Ray


author: Katerina Kovriga {Stiltsoft}
body: Hi [@ray scott](/t5/user/viewprofilepage/user-id/4668886) ,

Please clarify the issue a little bit more: maybe you could provide us with screenshots of manually created tables?

One of the output of the Jira Issues macro that you get - still struggling with the source table.

And the second one of the desired result: from your post I see that the first row looks like a summary and then we have some entries that are not in a tabular form at all.

Maybe our [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?tab=overview&hosting=server&utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) app will come in handy? We often have tricky cases with tables, for example, [this Community thread](https://community.atlassian.com/t5/Confluence-Cloud-questions/Table-Transformer-Table-merge-with-conditional-column-insertion/qaq-p/1982750).


author: ray scott
body: Thanks for your reply. I cannot offer screen shots due to security.

If you are familiar with JIRA, the hierarchy is very basic, we have Tasks that have Sub-tasks as children. The Task is a Summary/ higher lever record and the Sub-tasks are a breakdown of the work needed to support the higher lever task.

eg

TASK 1

\>\>\>\>Sub-task 1

\>\>\> Sub-task 2

\>\>\> Sub-task 3

I nee to print the details of each sub-task in a column, not a row, so each field of the Sub-task prints on a separate row


author: Katerina Kovriga {Stiltsoft}
body: Hi [@ray scott](/t5/user/viewprofilepage/user-id/4668886) ,

Didn't mean the exact screenshots - just images of manually created tables with dummy data before and after the required transformation.

If I got the case right, you want to transpose the table. Here are two options: the [Table Transformer](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Transformer+macro?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macro to transpose the whole table and the Table Transformer macro on top of the [Table Filter](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Filter+macro?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macro to transpose only Sub-tasks.

![Wed 11-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/190609iBBC3108BA87724DD/image-size/large?v=v2&px=999 "Wed 11-1.png")

![Wed 11-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/190610iAA7D91BDC6EE6C5A/image-size/large?v=v2&px=999 "Wed 11-2.png")

![Wed 11-3.png](https://community.atlassian.com/t5/image/serverpage/image-id/190612i5904A76DBCD5677D/image-size/large?v=v2&px=999 "Wed 11-3.png")

And here is the result with filtration:

![Wed 11-4.png](https://community.atlassian.com/t5/image/serverpage/image-id/190613iEE39A27C6232E23A/image-size/large?v=v2&px=999 "Wed 11-4.png")![Wed 11-5.png](https://community.atlassian.com/t5/image/serverpage/image-id/190614i2A07837EBF59FFBE/image-size/large?v=v2&px=999 "Wed 11-5.png")


author: Ste Wright
body: Hi [@ray scott](/t5/user/viewprofilepage/user-id/4668886)

To add, I don't think what you're looking for is going to be possible natively without a lot of filters.

*** ** * ** ***

You could *technically*...

* Create a table in your desired format
* Place a Jira Filter macro in **every cell** (for Sub-tasks)
* Then for the Sub-tasks...
  * Search for the *New York*Sub-task in every Jira Filter macro in the first column
  * Set the field to display to...
    * **only**State in the first row
    * **only**Population in the second
    * **only**Average Age in the third
* Repeat process for every other Sub-task cell

*** ** * ** ***

But, it would be a lot of manual work, and need manually updating each time new Tasks / Sub-tasks were added.

It'd be easier to look for an App which can help formulate the data in this manner - such as what is being suggested by Katrina :)

Ste


Tags: confluence-server

server