I am writing in Java and have already retrieved a JsonArray of Defect items from Rally. Now I want to be able to get only those User Stories that have one of the Defects I got associated with them. I have been unable to come up with a good query to do this, and currently I am getting all the User Stories and then looking through their Defects field to see if one of the defects I had is a member.
Can anyone suggest a query that would allow me to directly get the story that goes with a defect? Thanks.
Your best bet is to specify a fetch that will pull the fields you need from the story and attach them to the defect.
That would hydrate all of those fields on the story (Requirement) as well as the Defect.