Custom report scripts. Swap them with your forum friends

Wednesday, November 9, 2016 6:50:01 AM
Hi all,
Until Infectra create something like a report script trading area, I suggest we use this post to share our custom report scripts.
Please provide both:
  • The query/script code in a format others can cut and paste into their Spira Test
  • The version of SpiraTest you are running
  • A sample report to show others the results that your script will produce (i.e. a sample that shows a hew rows of your report, or attach a file)


4 Replies
Wednesday, November 9, 2016 3:36:30 PM
Avatar
re: DaveFederal on Wednesday, November 9, 2016 6:50:01 AM
Hi Dave

Thanks for setting this up. We are happy to help make this easier.

We could create a separate forum category just for reports so that people can post their scripts in that forum rather than being replies to this. Would that be helpful?

Regards

Adam
Thursday, November 10, 2016 3:00:23 AM
Avatar
re: inflectra.adam on Wednesday, November 9, 2016
Sure, so long as it's widely available and known.  Whatever helps the community better extract useful information from the tools.  Thanks
Thursday, November 10, 2016 3:54:53 AM
Avatar
re: DaveFederal on Wednesday, November 9, 2016 6:50:01 AM
Here's the first one for everyone.  A basic, simple traceability matrix

Spira ver
- SpiraTeam v5.0.0.8

Report sample
Requirement / Test Case Traceability Report    
REQUIREMENT_ID REQUIREMENT_NAME TEST_CASE_ID TEST_CASE_NAME
104 3.14 RG Reporting 2600 Reports can be accessed remotely and are filterable
104 3.14 RG Reporting 2601 VIP Room Access report
104 3.14 RG Reporting 2602 Player Status Report
104 3.14 RG Reporting 2603 Player Status Change History
104 3.14 RG Reporting 2604 RG Incidents by member
103 3.13 RG Management User Matrix 2605 WPH RG Manager/Staff, member home venue is WPH
103 3.13 RG Management User Matrix 2606 WPH RG Manager/Staff, member home venue is CCT
103 3.13 RG Management User Matrix 2607 CCT RG Manager/Staff, member home venue is CCT
103 3.13 RG Management User Matrix 2608 CCT RG Manager/Staff, member home venue is WPH

Query
select R.REQUIREMENT_ID, R.REQUIREMENT_NAME, R.TEST_CASE_ID, R.TEST_CASE_NAME from SpiraTestEntities. R_RequirementTestCases as R where R.PROJECT_ID = ${ProjectId}

Template
<?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="/RESULTS">
    <table class="DataGrid">
 <tr>
  <th>REQUIREMENT_ID</th>
  <th>REQUIREMENT_NAME</th>
  <th>TEST_CASE_ID</th>
  <th>TEST_CASE_NAME</th></tr>
      <xsl:for-each select="ROW">
         <tr>
  <td><xsl:value-of select="REQUIREMENT_ID"/></td>
  <td><xsl:value-of select="REQUIREMENT_NAME"/></td>
  <td><xsl:value-of select="TEST_CASE_ID"/></td>
  <td><xsl:value-of select="TEST_CASE_NAME"/></td>
         </tr>
      </xsl:for-each>
      </table>
    </xsl:template>
</xsl:stylesheet>
Thursday, November 10, 2016 3:07:38 PM
Avatar
re: DaveFederal on Wednesday, November 9, 2016
I have moved this entire thread to the new Custom Reporting forum.
Statistics
  • Started: Wednesday, November 9, 2016 6:50:01 AM
  • Last Reply: Thursday, November 10, 2016 3:07:38 PM
  • Replies: 4
  • Views: 978