title: Rally RestAPi-unable to update Test set results
body: <p>Though i am able to pull all the test cases present in a particular test set and modify or update all the test Results.
  Test set is not reflecting the verdict(pass/fail) after updating the Test cases in that Test set.</p>
  
  <p>If i navigate to one of the tescase detail page, i am able to see updated testcase result</p>
  
  <p>This is the test-set status after updating the testcases
  <img src="https://i.stack.imgur.com/zRHer.jpg" alt="test-set status after updating the testcases"></p>
  
  <p>But when <strong>one of those testcases</strong> are opened i am able to see the <strong>updated testcase result</strong></p>
  
  <p><img src="https://i.stack.imgur.com/ml2yI.jpg" alt="updated testcase result"></p>
  
  <p>code:
   QueryRequest testSetRequest = new QueryRequest("TestSet");
          testSetRequest.setFetch(new Fetch(new String[] {"Name", "TestCases", "FormattedID"}));</p>
  
  <pre><code>    testSetRequest.setQueryFilter(new QueryFilter("FormattedID", "=", "TS346"));
  
      QueryResponse testSetQueryResponse = restApi.query(testSetRequest);
  
      if(testSetQueryResponse.wasSuccessful()){
  
      System.out.println("Successful: " + testSetQueryResponse.wasSuccessful());
      System.out.println("Size: " + testSetQueryResponse.getTotalResultCount());
      for (int i=0; i&lt;testSetQueryResponse.getResults().size();i++){
          JsonObject testSetJsonObject = testSetQueryResponse.getResults().get(i).getAsJsonObject();
          System.out.println("Name: " + testSetJsonObject.get("Name") + " ref: " + testSetJsonObject.get("_ref").getAsString() + " Test Cases: " + testSetJsonObject.get("TestCases").getAsJsonObject().get("_ref"));
  
   int numberOfTestCases = testSetJsonObject.get("TestCases").getAsJsonObject().get("Count").getAsInt();
          System.out.println(numberOfTestCases);
          if(numberOfTestCases&gt;0){
               QueryRequest testCaseRequest = new QueryRequest(testSetJsonObject.getAsJsonObject("TestCases"));
                  testCaseRequest.setFetch(new Fetch("FormattedID"));
                  //load the collection
                  JsonArray testCases = restApi.query(testCaseRequest).getResults();
                  for (int j=0;j&lt;numberOfTestCases;j++){
                      System.out.println(testCases.get(j).getAsJsonObject().get("FormattedID").getAsString());
                      String s= testCases.get(j).getAsJsonObject().get("FormattedID").getAsString();
                      testCaseRequest = new QueryRequest("TestCase");
                      testCaseRequest.setFetch(new Fetch("FormattedID","Name"));
                      testCaseRequest.setQueryFilter(new QueryFilter("FormattedID", "=", s));
                      QueryResponse testCaseQueryResponse = restApi.query(testCaseRequest);
                      String testCaseRef = testCaseQueryResponse.getResults().get(0).getAsJsonObject().get("_ref").getAsString();
  
                      try{
                          //Add a Test Case Result
                          System.out.println("Creating Test Case Result...");
                          JsonObject newTestCaseResult = new JsonObject();
                          newTestCaseResult.addProperty("Verdict", "Pass");
                          newTestCaseResult.addProperty("Date", "2013-11-29T18:00:00.000Z");
                          newTestCaseResult.addProperty("Notes", "Automated Selenium Test Runs");
                          newTestCaseResult.addProperty("Build", "208");
                          newTestCaseResult.addProperty("TestCase", testCaseRef);
  
                          CreateRequest createRequest = new CreateRequest("testcaseresult", newTestCaseResult);
                          CreateResponse createResponse = restApi.create(createRequest);
  
                          if(createResponse.wasSuccessful()){
                              System.out.println(String.format("Created %s", createResponse.getObject().get("_ref").getAsString()));
                              //Read Test Case
                              String ref = Ref.getRelativeRef(createResponse.getObject().get("_ref").getAsString());
                              System.out.println(String.format("\nReading Test Case Result %s...", ref));
                              GetRequest getRequest = new GetRequest(ref);
                              getRequest.setFetch(new Fetch("Date", "Verdict"));
                              GetResponse getResponse = restApi.get(getRequest);
                              JsonObject obj = getResponse.getObject();
                              System.out.println(String.format("Read Test Case Result. Date = %s, Verdict = %s", obj.get("Date").getAsString(), obj.get("Verdict").getAsString()));
                          } else {
                              String[] createErrors;
                              createErrors = createResponse.getErrors();
                              System.out.println("Error occurred creating Test Case: ");
                              for ( i=0; i&lt;createErrors.length;i++) {
                                  System.out.println(createErrors[i]);
                              }
                          }
                      }
                      finally{
  
                      }
                  }
          }
      }
      }
          else {
              String[] createErrors;
              createErrors = testSetQueryResponse.getErrors();
              System.out.println("Error occurred creating Test Case: ");
              for (int i=0; i&lt;createErrors.length;i++) {
                  System.out.println(createErrors[i]);
              }
          }
  </code></pre>
  
  <p>so,Any idea of how to update the test set results</p>