To create a custom report you need to:
- Go to Administration > Edit Reports
- Create a new Report
- Specify that it should allow generation in MS-Word, Excel, HTML and PDF formats
- Choose to add a Custom Section and enter in the following:
SELECT R.REQUIREMENT_ID, R.INDENT_LEVEL, R.IS_DELETED
FROM SpiraTestEntities.R_Requirements AS R
WHERE R.PROJECT_ID = X AND
SUBSTRING (anyelement
(select value T.INDENT_LEVEL from SpiraTestEntities.R_Requirements as T where T.REQUIREMENT_ID = Y), 1, length(R.INDENT_LEVEL)) = R.INDENT_LEVEL
ORDER BY R.INDENT_LEVEL
(where you change the ID of the requirement ID to match the one you are trying to find instead of the value "Y" that you see in this example and you change the placeholder "X" to be the project ID). This will then display the requirement IDs of this requirement's parents.
This will then display something like the following:
REQUIREMENT_ID | INDENT_LEVEL | IS_DELETED |
---|
1 | AAA | False |
2 | AAAAAA | False |
3 | AAAAAAAAA | False |
4 | AAAAAAAAAAAA | False |