I am trying to create a defect in Rally using code that looks something like that:
JsonObject newDefect = new JsonObject();
newDefect.addProperty("Workspace", workspaceRef);
newDefect.addProperty("Project", projectRef);
newDefect.addProperty("Name", d.name);
newDefect.addProperty("QCID", d.qcid);
newDefect.addProperty("My Product", d.product);
newDefect.addProperty("Owner", getUserReference(restApi, d.owner));
newDefect.addProperty("Submitted By", getUserReference(restApi, d.owner));
System.out.println("Creating defect: " + d.qcid + " - " + d.name);
CreateRequest createRequest = new CreateRequest("defect", newDefect);
CreateResponse createResponse = restApi.create(createRequest);
The JSON that is being sent is: {"Workspace":"https://rally1.rallydev.com/slm/webservice/v2.0/workspace/1234", "Project":"https://rally1.rallydev.com/slm/webservice/v2.0/project/1234", "QCID":1, "Name":"my name", "Description":"my desc", "Notes":"my notes", "Owner":"https://rally1.rallydev.com/slm/webservice/v2.0/user/1234", "State":"Closed", "Resolution":null, "My Product":"MyProduct", "Severity":"4 - Low", "Submitted By":"https://rally1.rallydev.com/slm/webservice/v2.0/user/1234", "Environment":"Development", "Found in Version":"8.0", "Target Build":"10.0", "Affected Customers":null}
I get these warnings from rally:
Ignored JSON element defect.QCID during processing of this request.
Ignored JSON element defect.My Product during processing of this request.
Ignored JSON element defect.Submitted By during processing of this request.
Ignored JSON element defect.Found in Version during processing of this request.
Ignored JSON element defect.Target Build during processing of this request.
I tried to pass the QCID as a string value ("QCID":"1") but the result is the same.
How do I troubleshoot this? how can i know why these fields are not populated?
One thing in common for almost all of these fields is that they have a space in the name of the field. QCID doesn't have a space, but it was originally created as 'QC ID', so it had a space.
Thanks