How to Insert List of Baseline to Word Export
The attached template contains a customization which prints out all the Baselines of the export tracker at the beginning of the document:
The relevant script part is here:
#set($artifactManager = $applicationContext.getBean("artifactManager"))
## finds the Baselines of the export Tracker
#set($baselines=${artifactManager.findBaselineTags($request,$user,$tracker.project,$tracker)})
<span class="wikiContent">
<b>Baselines:</b>
<table class="requirement-props">
<tr><th>Name</th><th>Description</th><th>Created by</th><th>Date</th></tr>
#foreach ($b in $baselines)
#if ("${b.name}" != "Head Revision" && (${b.parent.id} == ${tracker.id}))
<tr>
<td>$!{b.name}</td>
<td>$!{b.description}</td>
<td>$!{b.owner.realName} </td>
<td>$!{b.createdAt}</td>
</tr>
#end
#end
</table>
</span>
|
If you want all baselines of the project then remove then modify the script and change these lines:
|
...
#set($baselines=${artifactManager.findBaselineTags($request,$user,$tracker.project,null)})
...
#if ("${b.name}" != "Head Revision")
...
This is how the result looks like: