Copy Code
|
|
---|---|
Private Function AddFollowUpFlagForBug(BugID) As Boolean ' Add a follow-up flag to a defect Dim BugF As BugFactory Dim Bug As Bug Dim followupbug As IFollowUpManager Set BugF = tdc.BugFactory Set Bug = BugF.Item(BugID) Set followupbug = Bug followupbug.SetFollowUp CDate("01/01/07"), "Check if fix documented" AddFollowUpFlagForBug = SUCCESS Exit Function FUNC_ERR: AddFollowUpFlagForBug = FAILURE End Function '######################################################### Private Function CheckIfBugHasFollowUp() As Boolean ' Check if a defect has a follow-up flag Dim aFollowUp As IFollowUpManager Dim aBug As Bug Dim aList As List Dim BugF As BugFactory Set BugF = tdc.BugFactory Set aList = BugF.NewList("") Set aBug = aList(1) 'Type cast: Set aFollowUp = aBug 'Is follow-up flag set? MsgBox aFollowUp.HasFollowUp CheckIfBugHasFollowUp = SUCCESS Exit Function FUNC_ERR: CheckIfBugHasFollowUp = FAILURE End Function '######################################################### Private Function CheckValuesOfBugFollowUpFlag() As Boolean ' Get values of follow-up flag Dim BugF As BugFactory Dim Bug As Bug Dim followupbug As IFollowUpManager Dim Description As String Dim followUpDate As Date Set BugF = tdc.BugFactory Set Bug = BugF.Item(13) Set followupbug = Bug followupbug.GetFollowUp followUpDate, Description If followUpDate = "13-07-06" Then MsgBox "date ok" End If If Description = "" Then MsgBox "Description blank" End If CheckValuesOfBugFollowUpFlag = SUCCESS Exit Function FUNC_ERR: CheckValuesOfBugFollowUpFlag = FAILURE End Function |