1
votes

How do I write a Rally query to give me all the Rally tasks for a user story which has a parent user story that has a specific ID?

For an ID of "S666", this works for tasks:

(WorkProduct.FormattedID = "S666")

And this works for user stories:

(Parent.FormattedID = "S666")

However, when I try the following:

(WorkProduct.Parent.FormattedID = "S666")

Then I get this error:

Could not parse: Could not traverse to "Parent" on type Artifact in the query segment "WorkProduct.Parent.FormattedID"

1

1 Answers

1
votes

Unfortunately you won't be able to do this directly from the task endpoint due to the error you found above. Since the WorkProduct field on Task is of type Artifact (not necessarily a story- could be a Defect, etc.) it has no Parent field.

However you should be able to query for stories where (Parent.FormattedID = "S666") and include Tasks (and any fields on Task you're interested in) in your fetch.

"/hierarchicalrequirement.js?query=(Parent.FormattedID = "S666")&fetch=Tasks,FormattedID,Name,Owner,State,Actuals,Estimate,ToDo"