After performing a bulk import of test cases from Excel using the Rally REST API, our traceability matrix reports show incomplete coverage between requirements and test cases. The import completed successfully with no errors, but when I run coverage reports, approximately 40% of the requirement-to-test-case links are missing.
I’ve verified the import data mapping included the Requirements field with proper FormattedIDs:
TestCase,Requirements
TC-001,US12345;US12346
TC-002,US12347
The query optimization for coverage reports is also taking significantly longer than before the import - timeouts after 2-3 minutes. This is blocking our compliance audit next week. Has anyone experienced traceability index issues after bulk imports?
Bulk imports can definitely cause traceability index lag. Rally doesn’t rebuild the index in real-time for large data sets. You need to manually trigger a traceability index rebuild from the workspace admin settings. Go to Setup > Workspace Configuration > Traceability Settings and click ‘Rebuild Index’. This can take 30-60 minutes depending on your data volume.
I’ve seen this before - the issue isn’t just the index. When you use semicolon-delimited requirement references in bulk imports, Rally’s relationship type validation can fail silently. The API accepts the data but doesn’t create the actual relationship objects. You need to verify each test case individually to see if the Requirements collection was populated correctly.
I triggered the index rebuild but it’s still showing the same gaps. I spot-checked a few test cases and the Requirements field is empty even though the import log showed success. Could this be a permission issue with the API token I used for the import? Or maybe the FormattedID format wasn’t recognized?
The FormattedID format in your CSV looks wrong. Rally’s REST API expects ObjectID references or full object URLs for relationship fields, not FormattedIDs. When you pass US12345 as a string, Rally can’t resolve it to the actual User Story object. You need to either query for the ObjectID first or use the reference format like /hierarchicalrequirement/123456789.
Let me address all four focus areas comprehensively:
Traceability Index Rebuild: The index rebuild is necessary but not sufficient. After triggering it from Workspace Configuration, monitor the background job status. If you have >10K artifacts, consider scheduling this during off-hours. The rebuild won’t fix missing relationships - it only indexes existing ones.
Relationship Type Validation: Rally’s REST API v2.0 requires collection fields like Requirements to use proper object references. Your CSV approach failed because:
// What you sent:
"Requirements": "US12345;US12346"
// What Rally needs:
"Requirements": [
{"_ref": "/hierarchicalrequirement/123"},
{"_ref": "/hierarchicalrequirement/456"}
]
Bulk Import Data Mapping: Implement a pre-processing script that queries Rally to build a FormattedID-to-ObjectID mapping table. Cache this locally to avoid repeated API calls. For your 40% missing links, you’ll need to run an update operation:
# Pseudocode - Key steps:
1. Query all test cases from your import batch
2. For each test case, parse Requirements field from source CSV
3. Resolve FormattedIDs to ObjectIDs via Rally query API
4. Update test case with proper reference array
5. Verify relationship creation via GET request
Query Optimization for Coverage: The timeout issue stems from Rally’s query engine scanning unindexed relationship tables. After fixing the missing links and rebuilding the index, optimize your coverage queries using Rally Query Language filters:
- Add
(TestCases.ObjectID != null) to requirement queries
- Use
pagesize=200 to reduce API round trips
- Cache coverage results and refresh incrementally
Implement these fixes in sequence - resolve the references first, then rebuild the index, then optimize queries. Your compliance audit should have accurate traceability within 24-48 hours of completing the reference updates.
Your bulk import script needs to resolve FormattedIDs to object references before creating relationships. Here’s what’s happening - Rally accepted your import but couldn’t parse the string references, so it created test cases without the relationship links. The query performance issue is separate - it’s because Rally is scanning all objects trying to build coverage reports without proper indexes.
For the data mapping fix, you need a two-phase import process:
// Phase 1: Query to resolve FormattedIDs
GET /hierarchicalrequirement?query=(FormattedID = "US12345")
// Returns: {"_ref": "/hierarchicalrequirement/987654321"}
Then use that reference in your test case creation. The relationship type validation requires proper object references, not string identifiers.