Super Contributor.
Super Contributor.

Links.AddAndLinkDefect not triggering

am trying to open new defect window from Test Execution view when user change status of Test Instance to Blocked.

Sub TestSetTests_FieldChange(FieldName)

If TestSetTest_Fields.Field("TC_STATUS").Value = "Blocked" then
Dim answer3
answer3 = MsgBox("You have blocked a Test Instance. Do you want to create a New Defect", vbQuestion + vbYesNo + vbDefaultButton2, "Test Instance Blocked")
If answer3 = vbYes then
'msgbox "Your choise is:" & answer

End If

End Sub

messages are displayed but the action is not getting triggered.

But in the same logic, I could open new defect screen if user Blocks a Test Step in Sub Step_AfterPost - Manual Runner module.

Can you please help if it will be possible to open new defect action (Links.AddAndLinkDefect) if user changes test instance status.

1 Reply
Micro Focus Expert
Micro Focus Expert

Because your current view is not "Linked Defects" view and Actions.Action("Links.AddAndLinkDefect").Execute cannot be triggered.

However, you can use Actions.Action("HeaderActions.HeaderNewDefect").Execute instead for reporting a new defect. But this defect will not have any linkage.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.