Skip Navigation LinksHome Page > Forums > SpiraTeam Forums > Spira Custom Reports > Exporting Incident Change...
We had the following request from a customer:
I'd like to export the Incident Change History to Excel for reporting purposes.In particular I'm interested in seeing the Status Changes of all incidents in my project.How can I implement such a report?
I'd like to export the Incident Change History to Excel for reporting purposes.
In particular I'm interested in seeing the Status Changes of all incidents in my project.
How can I implement such a report?
The following Entity SQL (ESQL) should be used to generate the report:
select C.CHANGESET_ID as ChangeSetId, C.CHANGE_DATE as ChangeDate, C.ARTIFACT_ID as IncidentId, C.ARTIFACT_DESC as IncidentName, D.FIELD_CAPTION as FieldName, D.OLD_VALUE as OldValue, D.NEW_VALUE as NewValue from SpiraTestEntities.R_HistoryChangeSets as C join SpiraTestEntities.R_HistoryDetails as D on C.CHANGESET_ID = D.CHANGESET_ID where C.PROJECT_ID = ${ProjectId} and C.ARTIFACT_TYPE_ID = 3
The automated XSLT template that Spira will generate will look like:
<?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>ChangeSetId</th><th>ChangeDate</th><th>IncidentId</th><th>IncidentName</th><th>FieldName</th><th>OldValue</th><th>NewValue</th></tr> <xsl:for-each select="ROW"> <tr><td><xsl:value-of select="ChangeSetId"/></td><td><xsl:value-of select="ChangeDate"/></td><td><xsl:value-of select="IncidentId"/></td><td><xsl:value-of select="IncidentName"/></td><td><xsl:value-of select="FieldName"/></td><td><xsl:value-of select="OldValue"/></td><td><xsl:value-of select="NewValue"/></td> </tr> </xsl:for-each> </table> </xsl:template> </xsl:stylesheet>
And the final output looks like:
And if you have any questions, please email or call us at +1 (202) 558-6885