Rally Software

 View Only

 Query - Count of all Defects under a User Story / Attachments to Test Cases

Jennah Wood's profile image
Jennah Wood posted Mar 08, 2023 12:29 PM

Hello,

I'm trying to capture the total number of defects under a milestone. I can get the count of defects that are "on their own" and tagged with the milestone fine. But I'm running into trouble when I try to get the count of the number of defects under the User Stories tagged with the milestone. 

I have a User Story with 3 defects attached to it but the best I can get is the Defect Status which is simply 1.

ALSO

I am trying to get a list of all the test cases as well that don't have any attachments to them. So when there is a test case "on it's own" in the milestone or under a User Story/Defect I want to see which test cases don't have an attachment of their results. 

Please help!

Sagi Gabay's profile image
Broadcom Employee Sagi Gabay

Hi Jennah.

For your first question:

If you wanted to get a list of defects "loosely associated" with a given milestone, which means they belong with stories that are associated with that milestone, what you can do is: Use the Custom List app (available in App Catalog) then in the Settings set the object to be 'Defect'. In the Query field add this filter:

(Requirement.Milestones.FormattedID = "<Use The Milestone Formatted ID Here>")    

This filter basically says: Get all the defects linked to stories (Requirement object), which are associated with a milestone that has that formatted id. 

On your second question:

To find TestCases that are directly associated with milestones AND have no attachments, you can also use the Custom List, set your object type to 'Test Case' and include this query filter:

((Milestones.FormattedID = "<your milestone formatted id here>") and (Attachments.ObjectID = ""))

This basically will get you test cases which directly associated to that milestone and do not have attachments.

I hope this helps. Please let us know.

Thanks,

Sagi