Copy Code
|
|
---|---|
Private Function ModifyBug(BugID) As Boolean ' Change defect properties On Error GoTo FUNC_ERR Dim BugF As BugFactory Dim Bug1 As Bug Dim InitialSummary$, InitialDescription$ On Error GoTo FUNC_ERR Set BugF = tdc.BugFactory Set Bug1 = BugF.Item(BugID) InitialSummary = Bug1.Summary InitialDescription = Bug1.Field("BG_DESCRIPTION") Bug1.AutoPost = False Bug1.AssignedTo = "cecil_alm" Bug1.DetectedBy = "cecil_alm" Bug1.Priority = "4-Very High" Bug1.Status = "New" Bug1.Summary = "Modified " & InitialSummary Bug1.Field("BG_DESCRIPTION") = "Modified " & InitialDescription Bug1.Field("BG_DETECTION_DATE") = "2006-02-02 12:00:01" Bug1.Field("BG_SEVERITY") = "4-Very High" Bug1.Field("BG_REPRODUCIBLE") = "Y" Bug1.Field("BG_PRIORITY") = "4-Very High" Bug1.Field("BG_RESPONSIBLE") = "alex_alm" Bug1.Field("BG_STATUS") = "Closed" Bug1.Field("BG_USER_01") = "item with spaces" Bug1.Post Bug1.Refresh If Bug1.Field("BG_DESCRIPTION") = InitialDescription Or _ Bug1.Summary = InitialSummary Then errmsg = "Bug1 not successfully modified" GoTo FUNC_ERR End If ModifyBug = VALIDATE_SUCCESS Exit Function FUNC_ERR: ModifyBug = VALIDATE_FAILURE End Function |