2017-06-02 1 views
0
JsonObject newTS = new JsonObject(); 
newTS.addProperty("Workspace", "/workspace/25194919975"); 
newTS.addProperty("Name", "name"); 
newTS.addProperty("Project", "/project/81223493876"); 
newTS.addProperty("Tags", tagName); 
newTS.addProperty("Release.Name", releaseID); 
newTS.addProperty("Iteration.Name", iterationID); 
newTS.addProperty("projectScopeUp", false); 
newTS.addProperty("projectScopeDown", true); 
newTS.addProperty("fetch", true); 
newTS.addProperty("rankTo", "BOTTOM"); 
newTS.add("TestCases", testCaseList); 

CreateRequest createRequest = new CreateRequest("testset",newTS) 
CreateResponse createResponse = restApi.create(createRequest); 

結果作成されたばかり:特定の反復でTESTSETを作成し、放出することができませんJavaのラリーAPIは、予定外の反復で

{"CreateResult": { "_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "Errors": [], "Warnings": ["It is no longer necessary to append \".js\" to WSAPI resources.", "Ignored JSON element testset.Tags.Name during processing of this request.", "Ignored JSON element testset.Release.Name during processing of this request.", "Ignored JSON element testset.Iteration.Name during processing of this request.", "Ignored JSON element testset.projectScopeUp during processing of this request.", "Ignored JSON element testset.projectScopeDown during processing of this request.", "Ignored JSON element testset.fetch during processing of this request.", "Ignored JSON element testset.rankTo during processing of this request."] 
+0

appriciate – bhamo02

答えて

0

確かに、あなただけのオブジェクト参照によってイテレーションとリリースを設定する必要がなく、あなたがProjectと同じように名前で。

newTS.addProperty("Iteration", "/iteration/12345"); 
newTS.addProperty("Release", "/release/23456"); 

にもいくつか他のもの:

projectScopeUpprojectScopeDownを設定するには、作成には影響しません。

fetchは、リクエストに応じて設定する必要があります。

createRequest.setFetch(new Fetch("true")); 

rankToは、リクエストに応じてPARAMとして追加する必要があります。

createRequest.addParam("rankTo", "Bottom"); 
+0

こんにちはカイルだろう助けることができ、迅速なresonseをありがとう エラーが発生する エラー: "/ release/release 2.2"からオブジェクト参照を解析できません – bhamo02

+0

A refの形式は/ /です。名前を指定しているようです –

関連する問題