Getting TESTCYCL_ID from LINK via DEFECT_ID
I am customizing our installation of Quality Center and have run into a bit of a roadblock...I have been through the the OTA API several times, mostly circling around BugFactory, LinkFactory and the BugLinkFactory, but haven't managed to get it right yet.
How do I get all of the TESTCYCL_IDs that are associated with a passed DEFECT_ID? I'm working within the Test Set Module (in Common Scripts) and I need to be able to do it without using any SQL commands.
I am working in VBScript; however, I can convert as necessary.
Re: Getting TESTCYCL_ID from LINK via DEFECT_ID
If speed of execution is not a major issue, the simplest is to use a filter
set IFlt = TSTestFactory.Filter
set BFlt = BugFactory.Filter
BFlt.Filter("BG_BUG_ID") = ThisBugId
IFlt.XFilter("TSTEST-BUG") = BFlt.Text
For Each LinkInst In IFlt.NewList