Improve project quality with Rational Team Concert 3.0 and ODC: Part 2. Support ODC analysis with BIRT custom reports

Using Orthogonal Defect Classification (ODC) for analytics throughout the software development cycle gives the team a deeper insight into the defect backlog and defect trends. The set of ODC analytics functions can enrich almost all software development processes. This article, the second in a two-part series, shows how to extend IBM® Rational Team Concert™ Version 3.0 to support ODC data analysis by creating custom reports with Business Information and Reporting Tools (BIRT).

Anna M Bizoń-Adamczyk (anna.bizon@pl.ibm.com), Software Engineer, IBM

Author photoAnna Bizoń-Adamczyk is a software engineer for the IBM Krakow Software Laboratory, in Poland. She joined IBM in 2006. She is interested in project management and activities related to configuring Rational Team Concert for project progress tracking and status reporting.



28 June 2011

Also available in Russian

Quick review of Orthogonal Defect Classification

This article is a second from a series (click "View more content in this series" to read the first article). The first part, "Classify and validate defects," introduced the Orthogonal Defect Classification (ODC) concept and showed a way of implementing the ODC process in IBM® Rational Team Concert™ Version 3.0. That article covers the detailed steps needed to enable ODC data collection along with defect tracking.

But the key factor to ODC methodology success is to provide a tool set for analyzing the ODC data that leads to identification of actions required to improve project quality. Rational Team Concert provides a powerful mechanism for reporting by supporting custom Eclipse Business Information and Reporting Tools (BIRT) reports. This article presents how to implement and deploy a general and configurable BIRT report template for the ODC trends analysis into your Rational Team Concert project area.

ODC analysis process

  1. Figure 1 shows the main steps of the ODC process. The first article covers the phases of classification and validation in terms of the Rational Team Concert configuration. This article focuses on establishing a basic set of ODC reports that extend the Rational Team Concert reporting and are created from one generic template.
Figure 1. ODC main process phases
Diagram of succession of the four activities

This aritcle is related strictly to the Assess phase by providing a direction for how to extend Rational Team Concert reports with a basic set of ODC reports that can be used for analyzing the ODC data. The solution presented in this article is as generic as possible to facilitate the creation of many ODC reports from one template.

ODC report requirements

In most cases, there are a few methods of performing the ODC analysis. The first, and most basic, is to represent all defects by an ODC attribute. The second is the analysis of defect trends during a specified period of time. Only valid defects are taken into consideration. The chart, which shows graphically number of incoming defects by selected ODC attribute (ODC Activity, ODC Trigger, ODC Impact, ODC Defect Type, and so on) in the form of a trend on a timeline, is very helpful at this point. The implementation of this chart in a form of a BIRT report is the topic of this article.


Objectives and prerequisites

In Rational Team Concert, you can create custom reports if the set of default reports do not satisfy your reporting needs. You can use this feature to apply ODC analysis capabilities.

Objectives

This article's main objective is to show how a custom Rational Team Concert report can be implemented and deployed for analyzing the ODC trends.

Prerequisites

  • Intermediate knowledge of using Rational Team Concert 3.0 Eclipse and web clients and basic skills on BIRT reporting.
  • Familiarity with the ODC concept, as well as the configuration to support defect work item custom attributes (described in the first article).
  • To start with custom reporting, you need to extend the Rational Team Concert Eclipse client with the BIRT plug-in (see Resources).

BIRT reports in Rational Team Concert

Rational Team Concert uses BIRT reports. BIRT can be installed into your existing Rational Team Concert Eclipse client as a plug-in. The client provides the Jazz™ technology data source for the purposes of custom reporting.

Custom reports created in BIRT show many different items, such as tables, charts, labels, images, and lists. All of this content can be interactive and customized, because it is driven by the JavaScript code within BIRT.

BIRT reports provide more complex views of the repository data, including many dimensions that could not be achieved by creating a Rational Team Concert query. See the Resources section of this article for more information about BIRT reporting in Rational Team Concert.

Rational Team Concert data warehouse

Rational Team Concert exposes historical and actual data stored in the repository in a form of several snapshots that contain a certain set of facts, dimensions, and relations. A work items snapshot, for example, stores information about all of the work items in the repository, including all historical aspects that, in most cases, are enough for reporting purposes. The instructions that follow present the way of starting from a very simple report that shows incoming defects.


Start from incoming defects

When all of the report requirements are clear, you can start implementing the report. It is considered a best practice to start with a simple data model and a chart that uses this data set, and then to incrementally extend its features and the level of complexity. This approach has been taken for this article by starting from an incoming defects chart and adding to it parameterization, custom formatting, and advanced techniques for retrieving the correct data from the Rational Team Concert data warehouse. The complete report will provide parameterization in a list of ODC attributes to be selected, and then grouping of the data by this attribute.

Create a Jazz data source

  1. Make sure that the BIRT plug-in is installed within your Rational Team Concert Eclipse client and the connection with the Jazz team server is established.
  2. Switch to the Report Design perspective.
  3. Create a new Report project and name it, for example, RTCReports.
  4. In the new project, create a blank report named IncomingDefectsByODCAttribute.rptdesign.
  5. Switch to the Data Explorer view for the created report.
  6. Right-click on the Data Sources node, and choose New Data Source. It is necessary to create a Jazz data source that retrieves data from your Jazz repository.
  7. In the dialog window (shown in Figure 2), select the Jazz data source type.
Figure 2. Creating a new Jazz data source
New Data Source window, Jazz Data Source selected
  1. Fill in the name of the new data source. In this case, use the data from the WorkItems snapshot from the Jazz repository, and name the data source WorkItems.
  2. Click Next.
  3. In the next window, provide snapshot information (see Figure 3). You can also test the connection by clicking the Test Connection button..
  4. Click Finish.

The WorkItems data source has been created.

Figure 3. Providing snapshot information
New Jazz Data Source, Snaphot Information view

Create a Jazz Simple Data Set

To start working with the work items data, you must create a data set that contains the appropriate data retrieved from the data source.

  1. Create new data set called WorkItemsDS. Make sure that the type is Jazz Simple Data Set.
  2. In the Fact Information dialog window, select the table. In this case, the most suitable one is LIVE_WORKITEM_CNT, which contains the live data about work items that include custom attributes.
  3. When you want certain data to be presented in your report, you must select the appropriate columns. For example, when you need information about incoming defects, a number of defects, and the date of their creation, you need to select CREATION_DATE and WI_COUNT columns for receiving with the data set.
  4. The LIVE_WORKITEM_CNT table contains information about work items of all types. For ODC reporting purposes, you need to restrict the result set to defects only. To achieve this, select a parameter WI_TYPE parameter and then mark that only work items of the Defect type are retrieved within the data set for analysis.
  5. In the Edit Data Set window, select the WI_TYPE parameter and edit it.
  6. Figure 4 presents providing a 'defect' (including the apostrophes) string as the default value for the WI_TYPE parameter in the Edit parameter pop-up window.
  7. Enter'{Current Project Area}' as the value for the PROJECT_AREA_NAME parameter.
Figure 4. Data set parameters
Edit Data Set window for WorkItemsDS with pop-up
  1. When you are connected to the Rational Team Concert server, you can select the Preview Results tab to verify that the appropriate data was loaded. This preview is very useful when you want to determine which data is stored in a given table.

Create a chart

Now it is time to create the first chart that presents the data from the newly created data set.

  1. From the Palette view, select Chart, as shown in Figure 5, and drop it into the report design area.
Figure 5. Report Palette
Palette view in the Eclipse client
  1. In the New Chart wizard, select bar chart as the type and stacked bar as the subtype.
  2. Select data from the WorkItemsDS:
    1. For Value (Y) Series, double-click the input.
    2. In the Expression Builder editor, select Available Columns Bindings and type WI_COUNT (see Figure 6).
Figure 6. Data binding with the Expression Builder
Expression Builder editor
  1. For Category (X) Series, repeat the same steps, and select CREATION_DATE for insertion. For CREATION_DATE, you can specify the grouping and sorting. Figure 7 shows an example with the date set to be displayed weekly as a sum.
Figure 7. DateTime grouping and sorting
New Chart wizard with Group and Sorting pop-u
  1. Format the chart. You can do it in a number of ways. For setting the example chart, select the following items:
    • Value (Y) Series: Show series labels
    • X axis: Labels formatting to show dates with 45-degree rotation.
    • Y axis: Displays major grid
    • Title: Incoming defects
  2. Click Finish and resize the chart to the required size.
  3. Click Preview to see the results of your actions.
Figure 8. Sample of an Incoming Defects report preview
Bar chart

Group incoming defects by ODC attribute

A chart that displays several defects within its open date is a good starting point for extending it by grouping additional defect attributes within the table. In this case, the grouped data must be displayed based on one of the ODC attributes. To implement the generic solution, you must provide the ODC attribute as a report parameter.

Provide report parameters

Besides the data set parameters, you can define global report parameters and use them in more than one data set. This method ensures the use of the same parameter value for many data sets. Parameters values can be provided as dynamic or static. At run time, you can show a parameterization UI and specify a desired value for it. The type and way of displaying it depends on the parameter configuration.

Figure 9. Report parameters in the Data Explorer view
Data Explorer tab, Report Parameters selected
  1. To add a global report parameter, right click Report Parameters in the Data Explorer view and create a new parameter with the settings shown in Figure 10.

In the first article in this series, you learned how to extend the defect work item with custom attributes to store ODC data. Table 1 illustrates the ODC attribute names and theirs IDs applied during process customization presented in Part 1.

  1. Add all of them as Value and Display Text entries in the static selection list values. In case of a different configuration, provide the assigned IDs for your ODC attributes.
Table 1. ODC Custom attributes names and identifiers
NameID
ODCActivityodc.activity
ODCTriggerodc.trigger
ODCImpactodc.impact
ODCTargetodc.target
ODCDefectTypeodc.deftype
ODCQualifierodc.qualifier
ODCAgeodc.age
ODCSourceodc.source
Figure 10. Adding new global report parameter
New Parameter dialog window
  1. You also need to extend your data set to include the custom ODC field value and an additional parameter. Custom attributes are presented as key value pairs in the LIVE_WORKITEM_CNT table, where the key is the custom attribute ID and the value is the literal ID.

Extend the WorkItemsDS

  1. Edit the WorkItemsDS and open the Fact Information tab.
  2. Select the STRING_VAL column.
  3. In the Parameters list, choose the STRING_KEY.
  4. In the Parameters pane, edit the STRING_KEY parameter and link it to the ODCAttribute report parameter, as shown in the Edit Parameter pop-up window in Figure 11.
Figure 11. Adding a parameter linked to an ODCAttribute report parameter to WorkItemsDS
Edit Data Set for WorkItemsDS window

When you open the Preview Results tab, you will notice that STRING_VAL has been filtered according to the STRING_KEY parameter default value, which is ODC Trigger, but it is not in human-readable format. This column includes only literal identifiers that are primarily stored in the Enumerations table.

Work with enumerations

To translate literal identifiers into human readable strings, you need to get the right mappings that are stored in the Enumerations table.

  1. Create a new data set for Enumerations.
  2. Provide '{Current Project Area}' as the parameter for the PROJECT_AREA_ITEMID column.

The ODC attributes and enumerations described in previous article were created to ensure the unique identifiers of literals within the project area. Moreover, the ODC attribute and the matching enumeration have the same ID. This makes the problem of matching the right literal with its name in the Enumerations table pretty simple.

BIRT data sets, which are analogous to SQL tables, can be joined. This mechanism is very useful for presenting data from more than one table, as in the case of an enumeration literal name not stored in LIVE_WORKITEM_CNT table but present in ENUMERATIONS table.

  1. What you need to do in BIRT is to create a Joint Data Set between WorkItemsDS and EnumerationsDS and name it, for example, JointDS.
  2. Ensure that Left Outer Join is selected under Join Types and STRING_VAL from WorkItemsDS and LITERAL_ID from EnumerationsDS are also selected.

This will cause merging of the right literal names into WorkItemsDS data. The Left Outer Join guarantees that you will not lose any data from WorkItemsDS.

Figure 12. Providing a query for the Joint Data Set (JointDS)
Edit Data Set window for JointDS

Change the chart data set

Now you need to edit the chart and update the data section by specifying a new data set as the Use Data From combo box value, and then fill the Optional Y Series Grouping with the LITERAL_NAME column value, as shown in Figure 13.

Figure 13. Changing the data set for the chart
Shows Chart Preview, Select Data, Data Preview

Set the title of the chart dynamically

You can add JavaScript code to change the chart title dynamically.

To add it, you must click in the chart area and go to the Script tab. Within the Script tab, in the onRender new event function, add the script snippet presented in Listing 1.

The JavaScript provides a simple manipulation of the parameter value. Alternatively, the information could be retrieved from the parameter display text value, but that requires a more complex script implementation, which is not in the scope of this article.

Listing 1. JavaScript function for dynamically setting the chart title
function beforeGeneration(chart, icsc)
{
  var title = 'Incoming Defects by ODC';
  title = title + 
    icsc.getExternalContext().getScriptable().getParameterValue("ODCAttribute");
  chart.getTitle().getLabel().getCaption().setValue(title);
}

Specify only valid defects

For the ODC analysis, take only valid defects into consideration. To implement this in your report, introduce one or more parameters, depending on how your project area process is configured, and then filter the data by possible states or resolution values.

See Figure 14 for an example of setting parameters of WorkItemsDS by RESOLUTION column to retrieve only the valid defect data.

Figure 14. Setting default parameter as a list of acceptable resolutions
Default Value field highlighted in Edit Parameter

Deploy the report template to the Jazz server

For your BIRT report to be fully functional in your Jazz environment, you must deploy the report to the Jazz server in the form of a report template. Follow these steps to upload your report to the Jazz server:

  1. Open the Jazz Administration perspective and the Team Artifacts view.
  2. Select the Project Area and expand it. Find the Reports node available in the tree structure from the chosen Project Area.
  3. Right-click the Report Templates child node, and select New > Report Template.
  4. In the dialog window that appears after adding the new report template (Figure 15), enter the report name and its ID.
Figure 15. Adding a new report template to the project area
Report Template window
  1. Give other team members access to your report by selecting the Shared check box, and choose the Project or Team Area under the Sharing section.
  2. Under the Contents section, click Browse, and provide a path to the created *.rptdesing file.
  3. Uncheck the Supports data caching check box.
  4. Click OK to proceed with deploying the report. The deployed report template is available in the Report Templates list.
  5. In the Shared Reports folder, create a subfolder and name it ODC.
  6. Find your report template, right-click it, and select New report.
  7. Save it in the ODC folder under Shared Reports.
  8. Open the report and click the top-right button to edit the parameters.
  9. Select one of the available ODC attributes.
Figure 16. Selecting an ODC attribute
Rational Team Concert report UI

Click Save Copy, enter a name, and move it from the My Reports folder to the ODC folder. This way, a complete set of the ODC reports with parameters set to each of the available ODC attributes can be created based on one common template.

Figure 17 presents some of the reports in Rational Team Concert web client.

Figure 17. Incoming defects by ODCTrigger for SampleProject
Rational Team Concert report displayed

Summary

This article outlined the method of extending the Rational Team Concert 3.0 reporting as a way of supporting the ODC Assessment activities. The Assessment phase of ODC is critical in understanding and measuring feedback that will ultimately influence any corrective actions needed. Further, a set of flexible and extendable tools is required to support and successfully take advantage of the ODC process. By accessing the Rational Team Concert data warehouse and using the BIRT Jazz data source, you learned how to quickly retrieve the appropriate data for analysis and how to present this data in a meaningful chart.


Acknowledgments

The author thanks Michael Spisak, IT Architect, IBM Certified Consulting IT Specialist, and Master Inventor, for his technical review and Witold Kopel, Justyna Drozdz, and Rafal Adamczyk for general reviews and encouragement.

Resources

Learn

Get products and technologies

  • Join the Jazz community to download Rational Team Concert 3.0 Client and Server trial versions.
  • Visit the Eclipse BIRT home page for BIRT downloads and knowledge.
  • Evaluate IBM software in the way that suits you best: Download it for a trial, try it online, use it in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement service-oriented architecture efficiently.
  • Visit the Eclipse BIRT home page for BIRT downloads and knowledge.

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Rational software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational, DevOps
ArticleID=688028
ArticleTitle=Improve project quality with Rational Team Concert 3.0 and ODC: Part 2. Support ODC analysis with BIRT custom reports
publish-date=06282011