Question & Answer
Question
Cause
Answer
Note:
Once you edit the query, you cannot use the User Interface (UI) to modify the query. You have to edit the SQL to modify the report.
Example 1: List of requirements showing the link type.
SELECT DISTINCT T1.PROJECT_NAME,
T1.REFERENCE_ID,
T1.NAME AS URL1_title,
T1.URL AS URL1,
T2.REFERENCE_ID AS REFERENCE_ID1,
T2.NAME AS URL2_title,
T2.URL AS URL2,
LT1.LINK_TYPE
FROM RIDW.VW_REQUIREMENT T1
INNER JOIN RIDW.VW_REQUIREMENT_HIERARCHY LT1
ON (T1.REQUIREMENT_ID = LT1.PRED_REQUIREMENT_ID)
INNER JOIN RIDW.VW_REQUIREMENT T2
ON (LT1.SUCC_REQUIREMENT_ID = T2.REQUIREMENT_ID)
WHERE (T1.ISSOFTDELETED = 0 AND T2.ISSOFTDELETED = 0) AND
(T1.REQUIREMENT_ID <> -1 AND T1.REQUIREMENT_ID IS NOT NULL) AND
(T2.REQUIREMENT_ID <> -1 AND T2.REQUIREMENT_ID IS NOT NULL)
Example of the output:
Example 2: A count of the link types
SELECT DISTINCT T1.PROJECT_NAME,
T1.REFERENCE_ID,
T1.NAME AS URL1_title,
T1.URL AS URL1,
LT1.LINK_TYPE,
COUNT(T2.REQUIREMENT_ID) AS Link_Count
FROM RIDW.VW_REQUIREMENT T1
INNER JOIN RIDW.VW_REQUIREMENT_HIERARCHY LT1
ON (T1.REQUIREMENT_ID = LT1.PRED_REQUIREMENT_ID)
INNER JOIN RIDW.VW_REQUIREMENT T2
ON (LT1.SUCC_REQUIREMENT_ID = T2.REQUIREMENT_ID)
WHERE (T1.ISSOFTDELETED = 0 AND T2.ISSOFTDELETED = 0) AND
(T1.REQUIREMENT_ID <> -1 AND T1.REQUIREMENT_ID IS NOT NULL) AND
(T2.REQUIREMENT_ID <> -1 AND T2.REQUIREMENT_ID IS NOT NULL)
GROUP BY
T1.PROJECT_NAME,
T1.REFERENCE_ID,
T1.NAME,
T1.URL,
LT1.LINK_TYPE
Sample output:
Links between requirements and test artifacts are always stored in IBM Engineering Test Management (ETM) not DOORS Next. Links between requirements in the same DOORS Next server are stored in that DOORS Next server. The RDF representation of a requirement to requirement link is simply an RDF statement of the form requirement1Uri predicate requirement2Uri. When in Report Builder you select multiple relationship types in the same traceability section, there is no way to distinguish which predicate applied, and hence which link type linked the two requirements.
When you want a report that does provide such a distinction, use multiple different traceability sections and different requirement variables:
Use Append rather than Merge where a requirement might have multiple instances of the relationships to avoid the Cartesian product of them, which can make such queries slow to execute.
Was this topic helpful?
Document Information
Modified date:
07 December 2021
UID
swg22012166