We’re experiencing a frustrating traceability gap after importing defects via CSV into Test Plans. The CSV contains 200+ defects with corresponding test case IDs, but none of the work item links are being established automatically.
Our CSV structure includes columns: ID, Title, State, Priority, TestCaseID. The import completes successfully and all defects appear in the quality management module, but the traceability matrix shows zero connections to test cases.
I’ve verified the test case IDs are correct and exist in the project. We need these links for compliance reporting and to track which test failures generated which defects. Has anyone dealt with CSV import limitations for establishing work item relationships? Is there a REST API approach to bulk-patch these relations after import?
I ran into this exact issue last quarter. The CSV import limitation is documented but not obvious. After import, we used PowerShell with the REST API to batch-create the links. The key is using the work item relations endpoint to add a ‘Tests’ link type between defects and test cases. Performance was decent - we processed about 300 links in under 2 minutes. You’ll need to map your TestCaseID column values to actual work item IDs in Azure DevOps first.
Thanks for confirming the CSV limitation. Do you have any sample code for the REST API batch linking? I’m comfortable with PowerShell but haven’t worked with the Azure DevOps REST API for work item relations before.
CSV import in Azure DevOps doesn’t support relationship fields directly. The import process only handles flat field values, not links between work items. You’ll need a post-import step to establish those connections.
From an audit perspective, having gaps in the traceability matrix is a red flag. Make sure whatever solution you implement also logs the linking activity. We use a separate tracking table to record when automated links are created, which helps during compliance reviews.