java - Rally: UserStory Count for a given project -


i doing java code fetching userstories given project.

    queryrequest hrrequest = new queryrequest("hierarchicalrequirement");     hrrequest.setfetch(new fetch("name","children","release"));     hrrequest.setworkspace(wsref);     hrrequest.setproject(prjref); 

the above code give me userstories tied iterations (i.e., if iteration blank - not fetch userstory)

but, need userstories fetched available under project/subproject

pls help

thanks vg

you may set project scope of request:

storyrequest.setproject(projectref); 

as long prior projectref specified:

string projectref = "/project/2222"; 

here code prints out story count in project:

public class areststories {      public static void main(string[] args) throws urisyntaxexception, ioexception {          string host = "https://rally1.rallydev.com";             string username = "apiuser@company.com";             string password = "secret";             string projectref = "/project/2222";             string workspaceref = "/workspace/11111";              string applicationname = "restexamplestoriesinproject";           rallyrestapi restapi = new rallyrestapi(                 new uri(host),                 username,                 password);         restapi.setapplicationname(applicationname);              queryrequest storyrequest = new queryrequest("hierarchicalrequirement");         storyrequest.setlimit(1000);         storyrequest.setscopeddown(true);         storyrequest.setscopedup(false);         storyrequest.setworkspace(workspaceref);         storyrequest.setproject(projectref);           queryresponse storyqueryresponse = restapi.query(storyrequest);         system.out.println(storyqueryresponse.getresults().size());     } } 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -