I am trying to build a specific table for a wiki. Unfortunately, I can't find the way to build it correctly.
We have several types of Work Items:
Domains
--Sub domains
----Function
------RG
RG work items can be at the same level than sub domain or function, but can be under a function too.
Here is the skeleton of what I need:
For a specific domain (if possible, the domain should be choosen by the user with a dropdown select
Sub-domain XXX-1
---RG 1
---RG 2
---Function XXX-f1
------RG 3
------RG 4
Sub-domain XXX-2
---Function XXX-f2
------RG 5
------RG 6
The table should have the following columns:
- ID (ID of the WI)
- Title (Title of the WI)
- Status (Enumeration)
- Flexibility (Custom field of the RG Work Items)
- Categories (Custom field of the RG Work Items)
Here is the code I made for the moment. A part of it has been taken here on the forum, for the Linked WI, which can be interesting for me to include too:
Code: Select all
##Récupération de l'ID du projet concerné
#set ($project_id = $page.getSpace().getProjectId())
#set ($myproject = "project.id:$project_id")
#set ($myquery = "$myproject AND type:domaine")
#set ($items = $trackerService.queryWorkItems($myquery, id))
<div>
<table class="itemsTable" style="width:100%;">
<thead> <tr>
<th width=15><b>ID</th>
<th width=70><b>Titre</th>
<th width=65><b>Linked items</th>
<th width=30><b>Status</th>
<th width=30><b>Flexibility</th>
<th width=30><b>Categories</th>
</tr> </thead>
<tbody>
#foreach ($wi in $items)
<tr>
<td> {workitem: $wi.id} </td>
<td> $wi.title </td>
<td>
#foreach ($link in $wi.getLinkedWorkItemsStructsBack())
{workitem: $link.getLinkedItem().id} role: $link.getLinkRole().id <br>
#end </td>
<td> {workitem: status:$wi.getStatus().id|fields=id as image}</td>
<td> </td>
<td> </td>
#end
</tbody> </table>
<div class="panelFooter" style="width:100%;"> QUERY: $myquery </i></div>
</div>
For this code:
Code: Select all
{workitem: status:$wi.getStatus().id|fields=id as image}
I don't have the result I'm looking for, I would like to display only the icon of the status, for it gives me the ID. I tried several things, as "as image" option, but I have errors.
Any help would be appreciated. If you need more details, just let me know.
Thanks a lot!