Find all descendants of a work item
Is there a way to write a query to find all of the descendant work items for a single work item? I do not see a way to find the grandchildren much less arbitrarily deep trees.
|
13 answers
I wrote custom sql to do it directly against the database because I could not find a way to do it in the product
|
Is there a way to write a query to find all of the descendant work There is no UI for this functionality, but if we are talking about a programmatic solution, you can use IWorkItemReferences resolveWorkItemReferences(IWorkItemHandle workItem, IProgressMonitor monitor) throws TeamRepositoryException; in IWorkItemCommon to get at the work item's children. You would then iterate over the children, get their children and so on. -- Regards, Patrick Jazz Work Item Team |
|
I think it could be possible to develop a BIRT report that builds the dependency tree. Can you please create an Enhancement request and we will look if this is feasible. Please assign it to the Reports team. I am 70 % sure this can be done with a BIRT report. The advantage of using the BIRT report is that no new code would need to be written. This will be a report template that you can deploy to any 2.0 RTC Server and voila you will have your dependency tree.
|
This is the basis of what we call "feature" based development. Not only
would you want to have notifications, but it would be great to be able to see code churn, activity aggregated for all the work linked from the top level feature. Definitely something that I'd like to see us implement... stay tuned. Cheers, Jean-Michel On 8/13/2009 4:23 PM, jleone wrote:
|
I deployed a report template that can find all dependants of a work item.
The report can even cross project areas and allows to select one or many relationship kinds and the depth of the search. Please check it out and tell us if this satisfies your requirements: https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.reports.viewQuery&queryUUID=_wS6G4ImjEd6HzLSYRe2U4w&name=Work%20Item%20Closure The report is still rough on the visual side. You can download the report template from: https://jazz.net/wiki/bin/viewfile/Main/ReportsCentral?rev=1;filename=Work_Item_Closure.rptdesign |
I deployed a report template that can find all dependants of a work item. Currently the result displays a table of Work Item Ids and their summary. But the report can be easily enhanced to display things like: The owner of the work item, the state, last modification time... The reporting component of RTC allows deploying report templates that can run javascript on the server. So really what this can do is almost limitless. Rafik Jaouani RTC Developer (Reports Component) |
Upated the report template to be more visually pleasing. The list of descendant work items now also displays the last modification date.
You can download the report template from: https://jazz.net/wiki/bin/viewfile/Main/ReportsCentral?rev=1;filename=Work_Item_Closure.rptdesign or look at the report in jazz.net: https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.reports.viewQuery&queryUUID=_wS6G4ImjEd6HzLSYRe2U4w&name=Work%20Item%20Closure Some feedback from the originator of this post would be really helpful. Rafik Jaouani |
Rafik,
What you have put together is great work. I am personally still wrapping my head around the capabilities of RTC. Ultimately, we want to see the hierarchy of children work items displayed in some sort of tree structure (think of a family tree). Can one control the graphical layout of reports like this? Is it possible for an end user to make this report more readily accessible from the work item view? For example, there is a Links tab for each workitem and when you go there you see Attachements and Links. Could we embed this report in that tab, alter the content of the "Links" section directly, or create a separate tab that ran this report? |
BIRT reports can present information in whatever form can be represented using HTML and Javascript. Displaying a graphical tree would probably require some fancy diagramming technology and would probably require a lot of work.
How about a very simple outline layout like: W1 W2 W3 W4 W5 W6 W7 W8 The above makes sense only for child work items. So a new report that only traverses children would be required. For easy navigation to the report, you could embed a similar URL to this at the bottom of the description field of the work item: https://jazz.net/jazz/web/projects/Rational Team Concert#action=com.ibm.team.reports.viewReport&reportUUID=report.WorkItemClosure&parameterName=Work Item&parameterValue=89302&parameterName=Relations&parameterValue='1 parent','2 child','3 blocks','4 blocked','5 duplicate','6 related' |
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.