Traceability matrix links between requirements and test cases breaking after migration

After migrating our project to ado-2024, bi-directional links between requirements and test cases in our traceability matrix are broken. We’re unable to generate compliance audit reports because the link validation queries are returning incomplete results.

When I run a WIQL query to validate requirement coverage:


SELECT [System.Id] FROM WorkItems WHERE [System.WorkItemType] = 'Requirement'
AND [System.Links.LinkType] = 'Tests'

The query returns only 40% of expected linked test cases. Manual inspection shows the links exist in the UI, but programmatic access via REST API and WIQL queries fail to retrieve them. This is blocking our regulatory compliance audits which require complete traceability documentation. Has anyone encountered link relationship issues after project migration in Azure DevOps?

Link type syntax in WIQL queries changed between versions. Try using the fully qualified link type name instead of the shortened version. Also check if your migration process preserved all work item link types - sometimes custom link types don’t transfer correctly and need manual recreation in the destination project.

Also worth checking: are you querying across different area paths or projects? Link queries have scope limitations, and if your requirements and test cases exist in different area paths, you might need to adjust your query scope. The REST API endpoints for work item links have specific parameters for cross-project link retrieval that aren’t obvious in the documentation.

The migration likely created links with incorrect direction attributes. In Azure DevOps, work item links have forward and reverse directions - ‘Tests’ vs ‘Tested By’. Your WIQL query only captures one direction. Try running separate queries for both link directions and combining the results. This is a common post-migration data integrity issue.