ALM defect field for time taken to go from open to closed
Question ID: 108111
0
0

Some people in management would like to have a counter on defects that calculates how long a defect has taken to go from "Open" to "Closed" in minutes, is this something that we could accomplish?

Marked as spam
Posted by (Questions: 100, Answers: 4)
Asked on January 29, 2018 8:34 pm
250 views
Answers (1)
0
Private answer

ALM includes by default the field ''Actual Fix Time'' which calculates the number of days that the defect took to go from open to closed. If you wanted to track this in minutes you would more than likely need to add a few new fields to ALM then manipulate them through workflow code. The ''Actual Fix Time'' is calculated by BG_CLOSING_DATE - BG_DETECTION_DATE . Since those fields only calculate the date that the bug was opened and closed you will need to create new fields that track the date and time, then create another new field that shows the calculation.

For example if I wanted to do this I could create two new fields, I will call them ''Bug Open Time
(BG_USER_01)'' and ''Time to Fix (BG_USER_03)'' Then I would create code and add it to the ''Bug_New'',
''Bug_FieldChange'', and ''Bug_MoveTo'' subs in workflow:

Sub Bug_New
On Error Resume Next
Bug_Fields.field(''BG_USER_01'').Value=tdconnection.servertime
On Error GoTo 0
End Sub

Sub Bug_FieldChange(FieldName)
On Error Resume Next
If Bug_Fields.Field(''BG_STATUS'').value=''Closed'' then
dim OpenedTime
dim FixedTime
OpenedTime=Bug_Fields.Field(''BG_USER_01'').value
FixedTime=tdconnection.servertime
Bug_Fields.Field(''BG_USER_03'').IsReadOnly=false
Bug_Fields.Field(''BG_USER_03'').value=DateDiff(''n'',OpenedTime,FixedTime)
Bug_Fields.Field(''BG_USER_03'').IsReadOnly=true

end if
On Error GoTo 0
End Sub

Sub Bug_MoveTo
On Error Resume Next
Bug_Fields.Field(''BG_USER_01'').IsReadOnly=true
Bug_Fields.Field(''BG_USER_03'').IsReadOnly=true
On Error GoTo 0
End Sub

Now when a user opens a defect the time it takes to be fixed in minutes will be tracked in the ''Time to Fix (BG_USER_03)'' field.

Marked as spam
Posted by (Questions: 0, Answers: 364)
Answered on January 30, 2018 2:43 pm
0
Another thing i forgot to mention, the fields that you add would need to be string fields, the date fields in ALM/QC defects don't seem to store the date and time, only the date.
( at January 31, 2018 2:58 pm)
EyeOnTesting

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

X
Scroll to Top