I am trying to write a query where I would like the list of defects and then the linked entity name. I do not see linked entity name in the table LINK. Anyone know how to get that field? When you click on the defect to view and click on Linked Entities there's a column called Linked Entity Name which will give you the script name (if linked at step or instance). I am trying to get that data. Below is the start of my query. Thanks.
BG_BUG_ID as "Issue ID",
BG_USER_04 as "Priority",
BG_USER_10 as "Script Name",
BG_USER_16 as "RICEFW",
LN_ENTITY_TYPE as "Type"
FROM Bug a, Link b
Where (a.BG_USER_10 LIKE '%.%' OR a.BG_USER_16 IS NOT NULL) AND b.LN_BUG_ID = a.BG_BUG_ID AND a.BG_STATUS <> '6-Closed' AND a.BG_STATUS <> '7-Closed' AND a.BG_STATUS <> '10-Rejected/Dup'
The name of the linked entity isn't stored in the LINK table, only its ID and the TABLE in which it resides. You'll have to take that ID (LN_ENTITY_ID) and that table name (LN_ENTITY_TYPE) and execute a query against that table for the record with that ID, and get the name from that table.