Sometimes you have a situation where a user deletes an entire tree of requirements and you only know the ID of one of the child items and not the parent ID that was actually deleted. This KB article provides a query that lets you find all the deleted parents of a specific requirement.

Here's what you will need to do. Go to Administration > System > Edit Reports and create a new report.

Add a new 'Custom Section' to the report.

In the custom section dialog box there is a place to enter in a query. 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:



Article Info
  • Last Updated: 2/1/2018
  • Article ID: KB144
  • Views: 1851