Skip Navigation LinksHome Page > Forums > SpiraTeam Forums > Spira Custom Reports > Custom Requirements Trace...
A customer wanted a RTM report that looped per row for each requirement, rather than having a set of requirements IDs concatenated with commas:
his section displays a list of all the requirements with the associated test cases/requirements.
Here's the XSLT you should use for this report:
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:template match="/RequirementData"> <table class="DataGrid" style="width:100%"> <tr> <th>Req #</th> <th>Name</th> <th>Type</th> <th>Status</th> <th>Release #</th> <th>Test Traceability</th> <th>Requirements Traceability</th> </tr> <xsl:for-each select="Requirement"> <xsl:for-each select="Requirements/ArtifactLink"> <tr> <td> RQ<xsl:value-of select="../../RequirementId"/> </td> <td> <xsl:attribute name="style"> padding-left: <xsl:value-of select="string-length(../../IndentLevel)*2"/>px; </xsl:attribute> <xsl:if test="../../IsSummary='True'"> <b> <xsl:value-of select="../../Name"/> </b> </xsl:if> <xsl:if test="../../IsSummary='False'"> <xsl:value-of select="../../Name"/> </xsl:if> </td> <td> <xsl:value-of select="../../RequirementTypeName"/> </td> <td> <xsl:value-of select="../../RequirementStatusName"/> </td> <td> <xsl:value-of select="../../ReleaseVersionNumber"/> </td> <td> <xsl:for-each select="../../TestCases/TestCase"> <xsl:if test="position() > 1">,</xsl:if> TC<xsl:value-of select="TestCaseId"/> </xsl:for-each> </td> <td> RQ<xsl:value-of select="ArtifactId"/> </td> </tr> </xsl:for-each> </xsl:for-each> </table> </xsl:template> </xsl:stylesheet>
Hello Adam,
We'd like to have a trace between requirements to test cases to test results (latest), can you please advise to achieve that?
What we'd like to see in the table
REQ1 - Req Name - TC1 - Test Results (i.e. Pass/Fail)
If there's a req covered by 2 TCs, we want to see that requirement splitted into 2 rows for each TC
Thanks,
And if you have any questions, please email or call us at +1 (202) 558-6885