I ran into this exact scenario last year and built a comprehensive solution using Azure DevOps REST APIs and service hooks. Here’s the approach that solved all four focus areas:
Story Splitting with Link Inheritance:
Create an Azure Function triggered by work item updates that detects split operations (new stories with ‘Parent’ relationship). The function queries the parent’s requirement links and replicates them to children:
// Detect split and get parent links
const parentLinks = await getWorkItemLinks(parentId, 'Requirement');
parentLinks.forEach(link => {
await createWorkItemLink(childId, link.targetId, 'Related');
});
Batch Updates:
For existing orphaned stories, I created a PowerShell script using batch REST API operations:
$batch = @()
foreach($child in $orphanedStories) {
$parentLinks = Get-ParentRequirementLinks $child.ParentId
$batch += New-LinkOperations $child.Id $parentLinks
}
Invoke-AdoBatchUpdate $batch
Sprint Planning Integration:
Added a custom board column rule that validates requirement coverage before stories can move to ‘Committed’ state. This prevents sprint planning from accepting incomplete stories. The rule queries the traceability matrix in real-time.
Traceability Matrix Preservation:
Implemented a nightly job that audits all stories split in the last 30 days, compares their requirement links against parent stories, and generates a compliance report. Any mismatches trigger automatic correction or flag for manual review.
The solution handles edge cases like:
- Multiple levels of story hierarchy
- Requirement links added after initial split
- Bulk split operations (10+ children)
- Cross-project requirement references
Implementation took about 2 weeks including testing. We’ve processed 600+ story splits over 8 months with zero orphaned stories. The automation runs at sub-second latency, so users don’t notice any delay. Sprint planning efficiency improved by 35% since teams no longer manually verify links.
Key configuration: Enable service hooks for ‘Work item updated’ events, filter for ‘System.LinkTypes’ changes, and ensure your service principal has ‘Read’ and ‘Write’ permissions on work items across all team projects.