分类:
2008-10-15 16:45:00
流程需要和工具结合,只有好的工具才能有力推动我们的流程实施起来。我们在实际工作中当bug状态修改的时候让我们的开发人员添加研发的评论在里面,针对这个功能我们来进行实现?针对该功能进行实现,打开qc9.2,登陆项目进行自定义,选择Workflow,打开scrīpt editor,编写代码
Dim PreviousStatus
Dim StatusChanged
Dim RDCommentChanged
Sub Bug_New
End Sub
Sub Bug_MoveTo
'Enter code to be executed after another bug receives focus
' save the status into PreviousStatus
PreviousStatus = Fields("BG_STATUS").Value
StatusChanged = False
RDCommentChanged = False
End Sub
Sub Bug_FieldChange (FieldName)
'Enter code to be executed after a bug field is changed
'if Status changed, then StatusChanged is TRUE
If FieldName = "BG_STATUS" Then
StatusChanged = True
'if R&D Comment is changed, then RDCommendChanged is TRUE
ElseIf FieldName = "BG_DEV_COMMENTS" Then
RDCommentChanged = True
End If
'if Status is changed from Open/Researching to Rejected and no R&D Comment is entered, then prompt user to enter R&D Comment
[1]