java - Defects for specific user story from rally -



java - Defects for specific user story from rally -

how retrieve/obtain defects particular user story form rally using rally rest api in java?

the next code have tried.

queryrequest projectrequest = new queryrequest("defect"); projectrequest.setproject( "https://rally1.rallydev.com/slm/webservice/v2.0/project/"+prjid); projectrequest.setqueryfilter(new queryfilter("requirement", "=", userr)); //projectrequest.setscopeddown(true); queryresponse projectqueryresponse = this.restapi.query(projectrequest);

assuming

string projectref = "/project/12345"; string storyref = "/hierarchicalrequirement/67890";

here illustration returns defects of user story:

try { restapi = new rallyrestapi( new uri(host), username, password); restapi.setapplicationname(applicationname); queryrequest defectrequest = new queryrequest("defect"); defectrequest.setproject(projectref); defectrequest.setfetch(new fetch(new string[] {"name", "formattedid","state", "priority", "severity", "requirement"})); defectrequest.setlimit(1000); defectrequest.setscopeddown(false); defectrequest.setscopedup(false); defectrequest.setqueryfilter(new queryfilter("requirement", "=", storyref)); queryresponse defectqueryresponse = restapi.query(defectrequest); (int i=0; i<defectqueryresponse.getresults().size();i++){ jsonobject defectjsonobject = defectqueryresponse.getresults().get(i).getasjsonobject(); system.out.println("name: " + defectjsonobject.get("name") + " state: " + defectjsonobject.get("state") + " priority: " + defectjsonobject.get("priority") + " formattedid: " + defectjsonobject.get("requirement")); } } { if (restapi != null) { restapi.close(); } }

java rally

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -