Count number of occurrences an issue has failed retest
Hi, is it possible to create a report using SQL which counts the number of times an issue has failed retest? We currently use a custom Status button "Retest Failed" with custom Reason Type of "Retest Failed Re Open" as part of our workflow to track when an issue fails retest. It would be useful, to identify high risk areas of code, to have the ability to report on number of times an issue retest gets failed. Thanks
In Issue Manager, you can find:
- Reason Code in IM_DefectHistory.DispositionOUT
- History Action Code in IM_DefectHistory.ActionCode
Assuming you have the Reason Code set to 'Retest Failed Reopen' the query would look like this:
SELECT i.DefectID, i.ProjectID_fk ProjectID, i.Synopsis, defStats.RetestFailedCount
FROM IM_Defect i
INNER JOIN (
SELECT IssueID_fk, COUNT (1) RetestFailedCount
WHERE DispositionOUT = 'Retest Failed Reopen'
GROUP BY IssueID_fk) defStats ON i.IssueID_pk = defStats.IssueID_fk
Go to Issues > Reports, create a new report and paste the SQL from above as advanced query.