It's all about the answers!

Ask a question

How can we extract the Defect work item history from RTC without any additional tools

Ashwath G (6623449) | asked Jul 30 '15, 4:12 a.m.
Hello, We have a requirement in the project to be able to extract the defect work item history which can be used for calculating the Aging of the defect with a particular team. HP QC / ALM provides a facility to query the history of test plan and test lab and also at the test case level. Similarly is there a way to use history in RTC for various update purposes

Can this be done by deploying newly introduced Jazz Reporting Services. If yes is all features of it has been enabled in 5.0.1 ? since some aritcle is saying it introduced in 5.0 but all futures are supported in 5.0.2.

And do we need a separate license for this component additionally.

Kindly let us know your inputs ....!

Thanks & Regards

Mushtaq Hussain commented Aug 02 '15, 4:48 a.m. | edited Aug 02 '15, 4:48 a.m.

Thanks Steven. 

The client wants to track the defect journey time, i.e how long the defect has stayed with each team. They had HP QC earlier, which allowed them to extract the history and process the timelines on a spreadsheet. They want something similar from RTC. Is there a way we can extract the defect history in RTC?

Steven Shaw commented Aug 05 '15, 11:32 a.m.

There is a way to extract the work item history using the JRS Report Builder.  First you would select Work Item History as the artifact, then add a condition on the particular work item ID and add the columns you want to display (including Last Update Time and the Work Item Category).  Then you would be able to see the paticular changes that occurred and when they occurred.

For more involved reports on Work Item History, it may be necessary to resort to the advanced SQL mode.  


Ashwath G commented Aug 06 '15, 3:16 a.m. | edited Aug 06 '15, 3:17 a.m.

Hello Steven,

Thanks for the inputs....we will explore the solution to build the reports.
And is there any article or documentation available explaining the report designing and execution  using JRS.

Thank You....!

2 answers

permanent link
Steven Shaw (55113) | answered Jul 30 '15, 2:04 p.m.

A question before I propose some possible workflows using the JRS Report Builder -->

Why do you think you need to query on the work item history for the aging characteristics?  If you're interested in age since creation, the Work Item stores a Creation Date attribute that indicates the date created.  In addition, there is a Resolution Date attribute indicating the date of resolution.  So it would help to know specifically what kind of aging characteristic you're trying to measure?

The Jazz Reporting Service was introduced in 5.0 and has progressively added more functionality in each subsequent release.  We started out with a series of Out of the box reports in 5.0.  In 5.0.1 we provided some basic self service report creation.  In 5.0.2 we introduced traceability reports and our latest release 6.0 now has the capability to aggregate and calculate values (count all values etc.).  It's possible this new aggregation functionality in 6.0 could be used as a starting point to count all work items that meet a certain aging characteristic to be displayed in a graph or a table.

In 5.0.2 this is not available, but we did provide an advanced SQL mode where the raw data query can be created in SQL and then pasted into report editor.  This is probably the only avenue for the 5.0.2 release.  

Best Regards,


permanent link
Girish Chandra P (853246) | answered Dec 30 '17, 5:13 a.m.
edited Dec 30 '17, 5:14 a.m.

Hello Ashwath,

This Link may Help you :

  IWorkItem workItem = workItemClient.findWorkItemById(id, IWorkItem.FULL_PROFILE, monitor);
    System.out.println("Last modified date: "+workItem.modified()+"\n");

    IItemManager itm = teamRepository.itemManager();
    List history = itm.fetchAllStateHandles((IAuditableHandle) workItem.getStateHandle(), monitor);
    System.out.println("Record history details:-");
    for(int i = history.size() -1; i >= 0; i--){
        IAuditableHandle audit = (IAuditableHandle) history.get(i);
        IWorkItem workItemPrevious = (IWorkItem) teamRepository.itemManager().fetchCompleteState

        Date recordModifiedDate = workItemPrevious.modified();
        System.out.println("Record modification date: "+recordModifiedDate);

Your answer

Register or to post your answer.