You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Rally API创建TestSet报错:目标迭代不在项目范围内

Troubleshooting "Desired iteration is not in project scope" Error When Creating TestSet via Rally API

Hey there, let's break down why your Rally API TestSet creation started failing suddenly after 3 years of smooth operation. The error message Could not update: Desired iteration is not in project scope points straight to a mismatch between the iteration you're linking to your TestSet and the project where you're creating the TestSet.

Common Root Causes

  • Iteration was re-assigned to another project: It’s likely someone on your team recently reorganized Rally projects and moved the iteration you’ve been using out of the target project for TestSet creation.
  • Iteration scope configuration changed: The iteration’s settings might have been updated to exclude your target project from its scope.
  • Stale iteration reference in code: If your code uses a hardcoded iteration ID or reference, that iteration could have been archived or reassigned to a different project recently.

Step-by-Step Fixes

  1. Verify the iteration’s project association
    Head to the Rally web interface, find the iteration you’re specifying in newTestSet, and check its "Project" field. Confirm it belongs to the same project where you’re trying to create the TestSet.

  2. Update the iteration reference in your request
    If the iteration is no longer in the target project:

    • Either move the iteration back to the target project (if that fits your team’s workflow), or
    • Replace the iteration’s ID/reference in newTestSet with one that’s explicitly linked to your target project. You can grab the correct iteration details from the Rally UI or via a quick API query for iterations in your project.
  3. Debug your request payload
    Add a log statement to print out the contents of newTestSet before sending the create request—this will let you confirm exactly which iteration you’re trying to link. For example:

    System.out.println("TestSet payload details: " + newTestSet.toString());
    

    Double-check that the iteration’s _ref or ObjectID points to an iteration within your target project.

  4. Validate API user permissions
    Make sure the user account your API uses has access to both the target project and the iteration you’re referencing. Sometimes permission changes can restrict access to iterations even if their project association looks correct.

Your core code structure isn’t the issue here—this is almost certainly a data or configuration change in Rally. For reference, here’s your existing code snippet:

CreateRequest createTSRequest = new CreateRequest("testset", newTestSet); 
CreateResponse createTSResponse = restApi.create(createTSRequest);

内容的提问来源于stack exchange,提问作者user7032675

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:05:14