Automating HP Quality Center with Python or Java

前端 未结 6 844
既然无缘
既然无缘 2021-02-03 13:59

We have a project that uses HP Quality Center and one of the regular issues we face is people not updating comments on the defect.

So I was thinkingif we could come up w

6条回答
  •  野性不改
    2021-02-03 14:46

    Though you have asked for a Python or Java based solution, sharing the following VBA code that you can use insde HPQC/ALM's script editor (Defects module script) to accomplish the goal.

    Function Bug_FieldCanChange(FieldName, NewValue)
    
     On Error Resume Next
    
     if not changed then
     strCommentBeforeUpdate = Bug_Fields("BG_DEV_COMMENTS").Value
     end if
    
     If FieldName = "BG_DEV_COMMENTS" and blnAddCommentClicked = False Then
        Msgbox "Cannot update the comments." & Chr(13)& "Changes made will not be saved."&Chr(13)& "Please use 'Add comment' button to insert new comment." &Chr(13)& " Or click Cancel without saving."
        blnUpdateCommentError = true
        blnAddCommentClicked = False
        changed = true
      End If
    Bug_FieldCanChange = DefaultRes 
    
    End Function
    

提交回复
热议问题