Is it possible to determine the time elapsed (age) between the date opened and date closed for a defect?
Question ID: 104460
4
0

Quality Center calculate the Actual Fix Time in days.
Is there a method to calulate the defect age in minutes, hours, etc.?

Marked as spam
Posted by (Questions: 70, Answers: 111)
Asked on February 7, 2012 12:10 pm
106 views
Answers (3)
5
Private answer

Quality Center does not store the timestamp in the `BG_DETECTION_DATE` field, only the date.

You can create two new user fields to store the beginning and ending timestamps as Stings.

BG_USER_01 / Label: TS_Opened
BG_USER_02 / Label: TS_Closed

In the `BUG_NEW` subroutine, populate the opened timestamp with this code.

Bug_Fields.Field(''BG_USER_01'').Value=CStr(Now())

In the `BUG_AFTER_POST subroutine`, populate the closed timestamp with this code.

If Bug_Fields.Field(''BG_STATUS'').Value = ''Closed'' Then
If Len(Bug_Fields.Field(''BG_USER_02'').Value) = 0 Then
Bug_Fields.Field(''BG_USER_02'').Value=CStr(Now())
Post
End If
End If

You could also create yet another field to store your defect age, ie `BG_USER_03`.
The defect age in minutes is calculated by: `Cint(DateDiff(''N'',DateOpened, DateFixed))`
The defect age in hours calculated by: `Cint(DateDiff(''H'',DateOpened, DateFixed))`

Marked as spam
Posted by (Questions: 0, Answers: 613)
Answered on February 7, 2012 12:22 pm
0
Thanks so much!
( at February 7, 2012 12:23 pm)
0
Can I please help on how to get a report that they can run on demand for any existing defect in retest that shows how long they have been open for?
( at January 21, 2016 10:10 pm)
0
Private answer

However this may not be the right solution. What if I need to know the aging of 1000 issues without even
triggering an event on the bugs through Move_To ?

Marked as spam
Posted by (Questions: 0, Answers: 2)
Answered on December 17, 2015 6:11 pm
0
Private answer

I appreciate if someone show the code on a custom button click on Defect page of QC, where each bug is opened and look at it's defect detected date & calculate age as of today i.e. system date.

Marked as spam
Posted by (Questions: 0, Answers: 2)
Answered on December 17, 2015 6:13 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top