nprs
nprs

Reputation: 93

How to filter defect results by a single story

This query return defects from a single project:

QueryRequest defects = new QueryRequest("defect");
defects.setProject("https://rally1.rallydev.com/slm/webservice/1.37/project/5022032422.js");

I would like to narrow down the result to a single story. Basically return defects associated with a single story. How can I do that?

Upvotes: 1

Views: 131

Answers (1)

Kyle Morse
Kyle Morse

Reputation: 8410

Check out the WSAPI docs here: https://rally1.rallydev.com/slm/doc/webservice/

You can see that Defect has a field called Requirement that represents its attached story. You can use that field in your query, specifying the desired story's ref as the value:

defects.setQueryFilter(new QueryFilter("Requirement", "=", "/hierarchicalrequirement/12345"));

Upvotes: 1

Related Questions