Custom fields in traceability report

Tuesday, March 16, 2021
Avatar

Hi,

For the current project our QA doesn't want us to use RQ numbers for traceability but rather QA-governed requirements numbers. These are in form of PRJ-SW-XXXX, where the XXXX is manually assigned requirements number for the subproject.

To accomodate this, I've created a mandatory custom field for requirements, which shall contain these QA numbers. 

It is fairly easy to include QA numbers for the requirements inside of the current projects but I can't figure out how to do the same for linked requirements?

Here's what I want to achieve:

QA IDBrief DescTypeStatusRelease

Traced to

QA ID

001-SW-001do somethingFeatureAccepted1.0001-PRS-001 
001-SW-002Do something elseFeatureAccepted1.1

001-PRS-002

001-PRS-125

 

 

To do it, I created a the following template. It works for QA ID column but not for "Traced to QA ID" one. What am I doing wrong?

<?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>MDX ID</th>
        <th>Brief</th>
        <th>Type</th>
        <th>Status</th>
        <th>Release #</th>
        <th>Test Traceability</th>
        <th>Traced to MDX ID</th>
      </tr>
      <xsl:for-each select="Requirement">
        <tr>
          <td>
            <xsl:if test="IsSummary='True'">
            </xsl:if>
            <xsl:if test="IsSummary='False'">
              <xsl:value-of select='CustomProperties/CustomProperty[Name="Custom_01"]/Value'/>
            </xsl:if>
            
          </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:if test="IsSummary='True'">
            </xsl:if>
            <xsl:if test="IsSummary='False'">
            <xsl:value-of select="RequirementTypeName"/>
            </xsl:if>
          </td>
          <td>
            <xsl:if test="IsSummary='True'">
            </xsl:if>
            <xsl:if test="IsSummary='False'">
            <xsl:value-of select="RequirementStatusName"/>
            </xsl:if>
          </td>
          <td>
            <xsl:if test="IsSummary='True'">
            </xsl:if>
            <xsl:if test="IsSummary='False'">
            <xsl:value-of select="ReleaseVersionNumber"/>
            </xsl:if>
          </td>
          <td>
            <xsl:if test="IsSummary='True'">
            </xsl:if>
            <xsl:if test="IsSummary='False'">
               <xsl:for-each select="TestCases/TestCase">
                 <xsl:if test="position() > 1">
                   , TC<xsl:value-of select="TestCaseId"/>
                 </xsl:if>
                 <xsl:if test="position() = 1">
                   TC<xsl:value-of select="TestCaseId"/>
                 </xsl:if>
               </xsl:for-each>
            </xsl:if>
          </td>
          <td>
            <xsl:if test="IsSummary='True'">
            </xsl:if>
            <xsl:if test="IsSummary='False'">
               <xsl:for-each select="Requirements/ArtifactLink">
                  <xsl:if test="position() > 1">
                    <xsl:value-of select="ArtifactName"/>,<br />
                    <xsl:value-of select="ArtifactLinkTypeName"/>
                  </xsl:if>
                  <xsl:if test="position() = 1">
                    <xsl:value-of select="ArtifactLinkTypeName"/><br />
                    [PR:<xsl:value-of select="ProjectId"/>] :
                    <xsl:value-of select='Properties/CustomProperty[Name="Custom_01"]/Value'/>
                  </xsl:if>
               </xsl:for-each>
           </xsl:if>
          </td>
        </tr>
      </xsl:for-each>
    </table>
  </xsl:template>
</xsl:stylesheet>

 

2 Replies
Saturday, March 20, 2021
Avatar
re: vladimir_midx Tuesday, March 16, 2021

Hi Vladimir,

Please take a look at this:

https://www.inflectra.com/Support/KnowledgeBase/KB592.aspx

Regards

David

Monday, March 22, 2021
Avatar
re: inflectra.david Saturday, March 20, 2021

Thank you very much!

I'll try it this week and report back if any issues will be identified.

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Tuesday, March 16, 2021
  • Last Reply: Monday, March 22, 2021
  • Replies: 2
  • Views: 1326