Skip Navigation LinksHome Page > Forums > SpiraTeam Forums > Spira Custom Reports > Requirement and tasks rel...
I tried to create a standard report which filter out the requirement and tasks. The template is as below.
<xsl:for-each select="Requirement"> <tr> <td> <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> <xsl:for-each select='Tasks/Task'> <tr> <td> <b> <xsl:value-of select="TaskId"/> </b> </td> <td> <xsl:value-of select="Name"/> </td> </tr> </xsl:for-each> </tr> </xsl:for-each>
I find that the second for-each is not working to retrieve the Task information.
May I know if it is possible to do so?
And if there is any document with corresponding information on the artifects relationship?
Hi Ricky
That should work, but it would depend on the base XML data you are getting back.
I would run the same report in Raw XML mode and see what data comes back, specifically if the child "Tasks" collection is being populated.
Regards
David
Hi David,
Thanks for your reply. For your information, I am using the <xsl:template match="/RequirementData">. Will it be the problem?
Regards,
Ricky Wong
And if you have any questions, please email or call us at +1 (202) 558-6885