Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

Bug_CanPost = False ..help

$
0
0

Hi All

 

I am having problems with the Bug_CanPost function

 

My understanding was if I coded:

 

Bug_CanPost = FALSE

 

I would not be able to submit a defect, i would expect an error message saying something to that extent

 

I have a requirement that on clicking 'Submit' for a defect

A user is warned to about a certain field

A message box is presented with the option they have chosen in that field and the user is asked to confirm it is correct.

On clicking 'ok' a defect is created fine.

On clicking 'Cancel' so they can go back and correct the defect, the msgbox 'Please correct service provider' is displayed. However on clicking 'ok' on the msgbox the defect is created anyway. I have highlighted in red where i am hoping to stop the defect creation and where i believe the code needs amending.

 

Any help would be greatly appreciated.

 

Function Template_Bug_CanPost
  On Error Resume Next
  'call Bug_CanPost
  Template_Bug_CanPost = Template_DefaultRes
  fService_Provider_Check
  On Error GoTo 0
End Function

 

Function fService_Provider_Check
Dim sSP
Dim sMsg
Dim sTitle
  On Error Resume Next
  Template_Bug_CanPost = Template_DefaultRes
  sSP = Bug_Fields.Field("BG_USER_04").Value
  sMsg = "You have raised a defect against " &sSP& " is this correct?"
  STitle = "Service Provider Verification"

  result = MsgBox (sMsg,vbOkcancel, sTitle)

  Select Case result
  Case vbOk
    MsgBox "Service Provider Confirmed"
  Case vbcancel
    MsgBox "Please Correct Service Provider"
    Template_Bug_CanPost = FALSE
  End Select
  On Error GoTo 0
End Function


Viewing all articles
Browse latest Browse all 5491

Trending Articles