Traceability Matrix
Traceability Matrix plugin renders trace-ability report between one or more trackers and their views in a Matrix form.
Parameters:
horizontalTrackersAndViews='Contains ids or keys of trackers and optionally their views to show on the horizontal axis'. This is in form of "<tracker-id>/<view-id>,<tracker-key>/<view-id>..." format where there is a "/" character between tracker-ids and view ids and "," between the next tracker/view id.
verticalTrackersAndViews='Contains ids or keys of trackers/views on the vertical axis.'
title='optional title of the plugin output'
max='100' Maximum number of issues displayed on the horizontal/vertical axis.
includeFolders='false' If the folder issues are displayed, defaults to false
defaultView='-2' The id of the default view when the view is missing from the horizontal/vertical id list. Defaults to -2 which is the "All Items" view for trackers
allowEditing='false' If the dependencies between issues can be edited as on the Traceability Matrix management page.
Additionally to the parameters the matrix's body optionally can contain a Velocity script. This script is called during rendering of the matrix for each cell, and allows you to customize the look and content of each cell. The output of this script is put to the cell. The script gets following variables in its scope:
{content} The original content of the cell. So if you want to keep the original content just add ${content} to the script
{cssClass} The original css class of the cell. You can change this value if you want some other class
{cssStyle} The original css style of the cell. Change this to add custom style
{horizontalTrackerItem} The current issue/tracker-item on the row (left)
{verticalTrackerItem} The current issue in the column (above)
{suspectedLink} Boolean if the cell contains a suspected link
{dependency} The TraceabilityMatrixController.TraceDependencyMapEntry instance defines the dependency between the horizontal/vertical items
{direction} The dependency direction between the issues, possible values are: 'NONE', 'H2V', 'V2H', 'BI'
{resolver} TrackerItemFieldHandler's instance can be used to resolve custom field values in the issues
{request}, {pageContext} and many more standard JSP attributes...
Here is an example of usage with a customized cell content:
[{TraceabilityMatrix horizontalTrackersAndViews='1250' verticalTrackersAndViews='1250'



#set($field = "Software safety classification")

#set($safetyHorizontal = $resolver.getItemFieldValueByFieldName($horizontalTrackerItem, $field))

#set($safetyVertical = $resolver.getItemFieldValueByFieldName($verticalTrackerItem, $field))



#set($color ="")

#if ($safetyHorizontal == "A" || $safetyVertical == "A")

#set($color ="green")

#end

#if ($safetyHorizontal == "B" || $safetyVertical == "B")

#set($color ="orange")

#end

#if ($safetyHorizontal == "C" || $safetyVertical == "C")

#set($color ="red")

#end



#if ($color != "")

#set($cssStyle = "background-color: ${color};")

#end



${content}

}]
Was this helpful?