View Single Post
  #3  
Old 07-09-2007, 12:46 PM
ambalboa ambalboa is online now
Registered User
 
Join Date: 06-25-2007
Location: Houston, TX
Posts: 70
Thanks.

I was able to write some vbscript and it doesn't give me an error. However, I would like for it to skip undo checkouts failure steps in which the checkout and checkin from a repository were done successfully. This is the build rule that I created:

[FECheckout = 1 And FECheckin = 0 Or FECheckout = 0] is true

FECheckout is a function that I defined on the Global tab pane in the Script Editor, shown below:

Function FECheckout
If Step.BuildStatus = vbldStepStatSucceeded Then
FECheckout = 1
Else
FECheckout = 0
End If
End Function

Function FECheckin
If Step.BuildStatus = vbldStepStatSucceeded Then
FECheckin = 1
Else
FECheckin = 0
End If
End Function

I wrote this for each checkout and checkin done. When the checkout and checkin action steps are build, they call the FECheckout and FECheckin functions, respectively. I just write on the Step tab pane in the Script Editor 'FECheckout' for the checkout action step, etc. However, it builds all the undo checkout failure steps instead of skipping the ones that checked out and in successfully or that were not build because they didn't have the chance. Is that the way it should work? The failure steps are build, but nothing is unchecked for those that should be skipped. I would like for it to undo checkouts when a checkout fails or when a checkout is done but a step fails before it is checked back in. I'm think the vbld_StepDone() function is needed, but I'm not sure how it works. Thanks again.
Reply With Quote