Overview
Inside SpiraTeam (or SpiraTest, SpiraPlan), you have the following built-in incident aging graph:
Sometimes you want to be able to generate an incident aging report that lets you have more fine-grained control over the data.
Custom Incident Aging Report
If you use the Spira custom reporting engine, the following ESQL will create a list of open incidents in the current project with the number of days open (i.e age in days) displayed in a column to the right:
select INC.INCIDENT_ID, INC.NAME, DiffDays(INC.CREATION_DATE, CurrentDateTime()) as AGING_DAYS from SpiraTestEntities.R_Incidents as INC where INC.PROJECT_ID = ${ProjectId}
and INC.IS_DELETED = False and INC.INCIDENT_STATUS_IS_OPEN_STATUS = True
order by AGING_DAYS desc
When you use the Create Default Template option, Spira will create the following table for you:
<?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>INCIDENT_ID</th><th>NAME</th><th>AGING_DAYS</th></tr>
<xsl:for-each select="ROW">
<tr><td><xsl:value-of select="INCIDENT_ID"/></td><td><xsl:value-of select="NAME"/></td><td><xsl:value-of select="AGING_DAYS"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
When you generate the report, you will get the following data:
INCIDENT_ID | NAME | AGING_DAYS |
---|
1 | Cannot log into the application | 5637 |
2 | Not able to add new author | 5637 |
3 | Clicking on link throws fatal error | 5637 |
4 | Database not backing up correctly | 5636 |
5 | Cannot install system on Oracle 9i | 5636 |
6 | The book listing screen doesn't sort | 5636 |
7 | Cannot add a new book to the system | 5634 |
8 | Editing the date on a book is clunky | 5634 |
9 | Editing the date on an author is clunky | 5634 |
18 | Ability to integrate with other systems | 5621 |
You can change the report to display data for all projects, a single program, a specific release, or group of releases by adjusting the WHERE clause part.