It's all about the answers!

Ask a question

How do I write a JRS report to get the list of user stories that are associated with a particular work item in its inheritance chain?


Kim Williams (56136) | asked Jan 20 '18, 9:07 a.m.
edited Jan 20 '18, 9:11 a.m.

Scenarios: 
Epic1 has children Epic2, Epic3, and Story1. 
Epic2 has children Story2 and Story3.
Epic3 has children Story4 and Epic4
Epic4 has children Story5 and Story6.
Epic5 has children Story7 and Story8.

I need  a JRS report that gives me all of the stories that are descendants of Epic1.  Please note: The report needs to be generic enough that is doesn't matter how many levels deep the stories are, or what the work item type is that I am using as the search criteria.  In other words, Epic1 may be Feature1, or may be Issue 1.  How do you do that?

So, to be explicit, the report should return Story1, Story2, Story3, Story4, Story5, and Story6.  Story7 and Story8 are not descendants of Epic1, and therefore should not be in the report. 
  

2 answers



permanent link
Kenji Sarai (96039) | answered Jan 22 '18, 1:42 a.m.

Hi Kim,

The possible solution is to do as below in "Trace relationships and add artifacts" ...
1. doesn't matter how many levels deep the stories are
AFAIK, you need to create traceability links as many as possible with optional option. If there is no more children, then it will be blank.

2.  doesn't matter what the work item type is that I am using
You can select Workitem in "Pick an artifact", then all workitem types are included.


Comments
Kim Williams commented Jan 23 '18, 2:12 p.m.

Thank-you for this information. I can get started with it.  I am wondering, however, if there is a way to write this by using the advanced section to write some custom XML.  Does anyone know if there is a way to do it that way?


Kenji Sarai commented Jan 24 '18, 1:15 a.m.

If you are an expert in writing a custom SQL query, yes - you can do so. You can understand what tables in database are used to get relevant data by creating report as above, and see the generated SQL query in Advanced section.


permanent link
Jackie Albert (1.6k14947) | answered Jan 23 '18, 11:27 a.m.

Kenji's response is correct, and I'll just add that there's no way to make the report dynamically include more layers if the hierarchy grows in size -- you'll have to go in and manually add more relationships if necessary.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.