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); 

Ergebnisse erstellt bekommen:java Rallye api, nicht in der Lage Testset in bestimmten Iteration zu erstellen und veröffentlichen, in ungeplanter Iteration

{"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

für die schnelle resonse – bhamo02

Antwort

0

Sicher, Sie müssen nur Iteration setzen und durch Objektverweis Ausgabe statt mit Name- genau wie Sie mit Project sind.

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

Ein paar andere Dinge auch:

projectScopeUp und projectScopeDown Einstellung hat keine Auswirkung auf eine erstellen.

fetch sollte auf Wunsch eingestellt werden:

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

Hallo Kyle, Dank wäre appriciate Kann helfen:

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

rankTo sollte als param auf die Anfrage hinzugefügt werden Ich erhalte folgenden Fehler Fehler: Kann Objektverweis von "/ release/release 2.2" – bhamo02

+0

A nicht analysieren ref ist vom Format//. Es sieht so aus, als würden Sie immer noch den Namen angeben ... –