| || |
Requirements History SQL
Does anyone know of an SQL query that extracts to Excel the history of changes to the QC Requirement Type field, including the old Requirement Type values, new Requirement Type values, the date(s) the changes were made and who changed them?
This query works on both MS SQL Server and Oracle databases:
SELECT RQ_REQ_NAME, AU_USER, AU_TIME, AP_PROPERTY_NAME, AU_ACTION, AP_OLD_VALUE, AP_NEW_VALUE
join AUDIT_PROPERTIES on AP_ACTION_ID = AU_ACTION_ID
left join REQ on RQ_REQ_ID = AU_ENTITY_ID
WHERE AU_ACTION = 'UPDATE'
and AU_ENTITY_TYPE = 'REQ'
and AP_FIELD_NAME = 'RQ_TYPE_ID'
ORDER BY 1, 3
Originally Posted by qarom
Thanks for that. Can this information be got back based on an accidental re-naming of a Requirement Type in the Tools >Customize >Requirements Types area, which changes all of the historical requirements from the old type to the new re-named type? The above query covers any changes to the requirement type within the Requirements module whenever a requirement type value is changed but not when a requirement type is re-named in the Tools >Customize >Requirements Types area.