Creating custom reports with BIRT and Rational Team Concert: Part 3. Advanced reporting techniques

IBM® Rational Team Concert™ can help software development teams store and organize an enormous amount of information, including work plans and tasks, builds and tests, and source code and other files. This article demonstrates how to visualize that information with custom reports by using Rational Team Concert and Eclipse Business Information and Reporting Tools (BIRT). It builds on the previous two parts of this series to show how to retrieve complex information from the repository.

Share:

Tim McMackin (tmcmack@us.ibm.com), Software Engineer, IBM

Photo of Tim McMackinTim McMackin is a technical writer for IBM Rational software in Raleigh, North Carolina. He has a background in writing for advertising technical products and has been with IBM since 2004.



15 June 2010

Also available in Chinese Vietnamese

About this article

IBM® Rational Team Concert™ can help software development teams store and organize an enormous amount of information, including work plans and tasks, builds and tests, and source code and other files. With any repository that size, visualization becomes an issue: how do you get a high-level view of the state of the projects that Rational Team Concert is tracking? Dashboards and work item queries provide some ways to see this information, but for a more customizable view, Rational Team Concert supports custom Eclipse Business Information and Reporting Tools (BIRT) reports loaded directly into the Web client.

Objectives

These instructions cover the following subjects:

  • Customizing the report with parameters
  • Using complex logic by applying JavaScript code to data sets
  • Counting work items that meet specific criteria
  • Retrieving historical data from the Rational Team Concert repository
  • Understanding the differences in behavior between the live data tables and the historical data
  • Using data from various areas of the Rational Team Concert repository
  • Linking from reports to relevant work items

Prerequisites

This article series assumes basic familiarity with reports in Rational Team Concert, as covered in Part 1 and Part 2. If you are not familiar with reports in Rational Team Concert and BIRT, work through the preceding articles first.

To follow these instructions, you need a free account on jazz.net and the full or trial versions of Rational Team Concert server and Rational Team Concert client. If you do not have a server and client, Part 1 describes how to get a trial version of the Rational Team Concert server and a free version of the Rational Team Concert client.


Filtering the report with parameters

In the previous article (Part 2), you saw how you can pass a parameter to a single table in the report. You can also set global parameters for the report and use those parameters in as many data sets as you want. For example, you might want to filter the team areas to show only the areas that you are interested in. In this case, you create a new data set to represent all of the team areas to choose from, and then you expose that data set to the report user as a list box. Then you can limit other data sets to only the team areas that the report user selects in the list box.

  1. Create a data set named Team area options from the common data source TEAM_AREA table.
  2. Select the TEAM_AREA_NAME and TEAM_AREA_ITEMID columns as the output and TEAM_AREA_ARCHIVED as the parameter.
Figure 1. Creating a data set of team areas
New Jazz Data Set window
  1. Set the archived parameter to false so only active team areas are included in this data set.
  2. Create a parameter for the report using that data set as the possible values:
    1. In the Data Explorer view, right-click Report Parameters and then click New Parameter.
    2. In the Edit Parameter window, name the parameter Selected team areas.
    3. In the Prompt Text field, type Team areas.
    4. In the Data type list, select String.
    5. In the Display type list, select List Box.
    6. Under Display As, clear the Hidden check box and select the Is Required check box.
    7. Under List of values, click Dynamic. This option allows you to use the data set for the values, rather than typing them all in manually.
    8. Clear the Allow Multiple Values check box. Rational Team Concert does not recognize this check box; Rational Team Concert allows multiple values for parameters shown as a list box and single values for parameters shown as a combo box.
    9. In the Data set list, select the Team area options data set.
    10. In the Select value column list, select TEAM_AREA_ITEMID. This column is a unique identifier for the team area.
    11. In the Select display text list, select TEAM_AREA_NAME. This column is the name of the team area, to be used as the label for the parameter.
    12. In the Sort by list, select TEAM_AREA_NAME.
    13. Click OK.
Figure 2. Creating a parameter
Edit Parameter dialog window

If you upload the report to the server and run it, you see a list box that lets you select one or more team areas. You can select the team areas that you are interested in and then click Run, but because the parameter is not yet bound to anything, the parameter does not yet limit the data sets.

Figure 3. Specifying the parameter values for the report at run time
My Work Items view
  1. Bind the parameter to the team areas data set:
    1. In the Data Explorer view, double-click the Users data set.
    2. On the Fact Information tab of the data set editor, add the TEAM_AREA_ITEMID column to the parameters for the data set. On the Parameters tab of the data set editor, select the TEAM_AREA_ITEMID parameter and then click Edit.
    3. In the Edit Parameter window, in the Linked To Report Parameter list, select the Selected team areas parameter.
Figure 4. Binding the data set field to the parameter
Edit Parameter window in Edit Data Set–Users view
  1. Click OK to save and close the data set.

Now, when you upload the report to the server, select a team area for the parameter, and run the report, you see a list of only the users that are associated with the specified team area. The work items data set still shows all of the work items that are associated with each user, regardless of the team area of the work item. If you wanted to, you could filter the work items according to the team area parameter as well.

In this way, parameters let you limit reports to a manageable size, because reducing the amount of data that is shown on the report makes it run faster and show more concise information.

Parameters also let you customize reports for specific audiences. When you click the Edit button in Rational Team Concert and set the parameters for the report, you can click Save Copy to save a new copy of the report. This new copy uses the same report template with different parameters, and it will be updated automatically if you upload a new report design file.


Other techniques for cross-referencing data

The nested data set technique that is described in Part 2 is often enough to show complex data on a Rational Team Concert report. However, there are other techniques for relating one data set to another.

Scripted variables

You can create a global JavaScript object that stores a table and then use this object each time that you need to access the data. This method can be more convenient for data that remains constant over the report, or data that you want to refer to often, because you don't have to nest a data set every time you want to use it.

For example, the priorities and severities of work items are stored in the ENUMERATIONS table. This table also contains any custom enumerations that you create, such as if you add a custom attribute to a work item. If you create a simple data set based on the ENUMERATIONS table and pass the ID of the enumeration and the ID of the project area, the results look like what Listing 1 shows.

Listing 1. The severity enumeration
ENUMERATION_ID  LITERAL_ID  LITERAL_NAME	
severity        1           Unclassified	
severity        2           Minor	
severity        3           Normal	
severity        4           Major	
severity        5           Critical	
severity        6           Blocker

The PROJECT_AREA_ITEMID parameter is required for a data set created from the ENUMERATIONS table. If you leave this parameter blank, you won't get any results in the data set. You can use the '{Current Project Area}' variable (including the quotation marks when you pass the parameter) to get the current project area, or you can specify the project area ID manually.

For readability, you probably want to show the label of the enumeration value (in this case, string values such as "Major" or "Minor"), rather than the unique ID of that value. However, tables that contain information about work items, such as the LIVE_WORKITEMS_CNT table, show the ID of the value rather than the label, as Listing 2 illustrates.

Listing 2. Work items by severity
WI_ID   SUMMARY         WI_SEVERITY	
1234    Small glitch    2	
5678    Medium problem  3	
9123    Big problem!    5

Thus, you must cross-reference the unique IDs in the LIVE_WORKITEMS_CNT table to the values in the ENUMERATIONS table. However, your report might use these enumerations in several places. You could nest an enumerations data set everywhere you use that enumeration value, but that would create an excessive number of tables on the report and increase its loading time. You could join the enumerations data set to the work items data set, but that might be unwieldy if the work items data set is also joined to another data set. A simpler way is to create a global JavaScript object that relates each enumeration value to its label. Then, you can refer to that object any time you need to look up the severity of a work item.

Video demonstration

A video demonstration of this technique is available on the IBM Jazz YouTube channel (see the Resources section)

The following steps cover the basics of this technique:

  1. Create a data set for the enumeration values, such as the example with the severity enumeration above. Using the Preview tab, make sure that it shows the data for the enumeration that you are interested in.

You don't want to show this data set on the report directly, but you must add it to the report in some way or else the report will not populate the data set with data. The following steps add an invisible reference to the data set on the report.

  1. From the Palette view, drag a dynamic text field to the top of the report.
  2. Enter the following expression in the expression editor:
    Total.count();
  3. Click OK.
  4. Select the new dynamic text field and open the Property Editor view to the Binding tab.
  5. In the Data Set list, select your data set.
  6. Go to the Properties tab and click the Visibility section.
  7. Select the Hide Element check box and the For all outputs radio button.

Now the data set will be populated when the report runs, but the raw data will not appear directly on the report.

  1. In the Data Explorer view, select the data set.
  2. In the report editor, go to the Script tab.

This tab shows the custom scripts that control the data set. A complete guide to BIRT scripting is beyond the scope of this article, but in short, each data set can have several event handlers that run at certain points in the data set's life cycle. In this case, you need to create a JavaScript object when the data set is opened, and then you need to add information to that object for each row in the data set.

  1. In the Script list at the top of the editor, select the beforeOpen event. This event happens only once: before the data set is filled with data.
  2. Enter the following code into the editor:
    severity = new Object();
  3. In the Script list, select onFetch. This event happens once for each row on the data set.
  4. Enter the following code as the onFetch event handler:
    severity[row["LITERAL_ID"]] = row["LITERAL_NAME"];

This code adds a linked name and value pair to the object. When the data set is fully populated and the object is created, you can use it to look up the labels for each value in the enumeration. For example, inserting the code severity[1] yields "Unassigned."

Using the objects in other data sets

Now you can use the object in other data sets. For example, if you have a data set of work items, you can add a computed column that shows the severity.

  1. Open the data set editor for a data set that lists work items.
  2. On the Fact Information tab, make sure that the WI_SEVERITY tab is selected as an output column.
  3. On the Computed Columns tab, add a new computed column with the type String and a name such as Severity Name.

In the Expression field, enter the following code:
severity[row["WI_SEVERITY"]]

Figure 5. Creating the computed column
Edit Data Set – New Computed Column

This data set won't show any information on the Preview Results tab, because the JavaScript object isn't populated yet. However, when you run the report, the data set shows the severity name in the appropriate column because it can use the values from the object, as Listing 3 shows:

Listing 3.The work items data set including the new computed column
WI_ID   SUMMARY         WI_SEVERITY  Severity Name
1234    Small glitch    2            Minor
5678    Medium problem  3            Normal
9123    Big problem!    5            Critical

Table joins

As in SQL, BIRT data sets can be joined. The details of a SQL table join are beyond the scope of this article. But in simple terms, a table join creates a composite table from two other tables.

This method has the advantage of creating a single data set with information from two tables in the repository, unlike the nested data set technique. Having a single data set to work with can make it easier to use logic that requires information from both tables, and it can be easier to format and arrange a single table on the report than multiple nested tables. Also, some data source types (such as XML files) do not support parameters, so table joins might be the next-best option.

For example, the STATE table (Listing 4) in the WORKITEMS_SNAPSHOT snapshot stores information about the possible states of work items.

Listing 4. Sample data from the STATE table
STATE      STATE_GROUP         STATE_NAME 
_Efk74JK1  OPEN_STATES         New 
_Efk74JK6  OPEN_STATES         Reopened 
_Efk74JK7  OPEN_STATES         Triaged 
_Efk74JK2  IN_PROGRESS_STATES  In Progress 
_Efk74JK4  CLOSED_STATES       Verified 
_Efk74JK3  CLOSED_STATES       Resolved 
_Efk74JK5  CLOSED_STATES       Closed

The LIVE_WORKITEM_CNT table (Listing 5) includes a column that refers to the state in the STATE table. The states in the STATE table are prefixed with the project area ID and the states in the LIVE_WORKITEM_CNT table are not, but you will correct for that later.

Listing 5. Sample data from the LIVE_WORKITEM_CNT table
WI_ID   SUMMARY         STATE_NAME
4321    Fixed issue     3
9876    New problem     1
1111    Current work    2

As with the severity enumeration described in the previous section, it would be more convenient to have the state group and state name information in the same data set as the work item information. You can do this by joining the tables and merging the information between them. In SQL terms, this merge calls for an outer join, which matches each row in the work items data set to the single row in the states data set with a matching state ID.

  1. Create a data set that lists work items, including the STATE_NAME column.
  2. Add a computed column to the work items data set named "State ID" that concatenates the project area name with the STATE_NAME column (see Listing 6). The value for this column might look like this:
    '_Efk74JK'+row["STATE_NAME"]This computed column matches the ID value in the state table.
Listing 6. Sample data from the STATE table
WI_ID   SUMMARY         STATE_NAME  State ID
4321    Fixed issue     3           _Efk74JK3
9876    New problem     1           _Efk74JK1
1111    Current work    2           _Efk74JK2
  1. Create a data set that lists the states in the STATE table.
  2. In the Data Explorer view, right-click Data Sets and then click New Joint Data Set.
  3. In the New Joint Data Set window, select the work items data set on the left side and then select the State ID column under the data set name.
  4. On the right side, select the state data set and then select the STATE column.
  5. Under Join Types, click Left Outer Join.
  6. Name the data set something like Join Work Items to States.
Figure 6. Joining the data sets
Join Data Set window
  1. Click Finish.

The new joint data set (Listing 7) contains merged information from both data sets. Do not delete the two original data sets, because the report still uses them to populate the joint data set.

Listing 7. Results from the joint data set
Work items::WI_ID  Work items::State ID  States::STATE  States::STATE_NAME
4321              _Efk74JK3              _Efk74JK3      Resolved
9876              _Efk74JK1              _Efk74JK1      New
1111              _Efk74JK2              _Efk74JK2      In Progress

Counting the results with the WI_COUNT column

Most of the tables in the work items snapshot include the WI_COUNT column, which shows the sum of the work items that have matching characteristics. For example, suppose that you want to know how many total work items are in the repository. In this case, you can use the LIVE_WORKITEM_CNT table and specify only the WI_COUNT column in the output:

WI_COUNT	
656

If you specify other columns to include in the results, the WI_COUNT column counts the number of work items according to each of those columns. For example, if you add the TEAM_AREA_NAME column to the output, the WI_COUNT column shows the number of work items in each team area:

TEAM_AREA_NAME  WI_COUNT	
Team A          134
Team B          312
Team C          210

You can do the same thing with the work item types by including only WI_COUNT and WI_TYPE in the output columns:

WI_TYPE     WI_COUNT
story       25
defect      505
task        126

The WI_COUNT column is often used with the historical tables, as described in the next section.


Retrieving historical data

So far, you've seen that Rational Team Concert presents information to reports in tables, which form the basis of data sets in BIRT. Some of these tables come from the live data in the Rational Team Concert repository, such as the LIVE_WORKITEMS_CNT table that you've been using for information about work items. If a work item changes, that change is reflected in this table immediately.

Other tables come from a data mart, rather than directly from the repository. Rational Team Concert filters and formats complex information into the data mart to provide that data in a more convenient structure. For example, the Rational Team Concert server records information in the data mart about the changes to the repository, such as how many new work items are created each day. Thus, with the data mart, you can retrieve information not just about the current state of the repository but about trends, changes, and time periods.

When you create or run reports, it's important to remember that the information in the data mart may lag behind the data in the repository. In an earlier part of this series, you created a data set of users. If you had recently installed the Rational Team Concert server, that table did not show any of the users in the repository. To fix the problem, you had to force the server to take a snapshot of the repository and update the data mart. Similarly, if you create a new team area, that team area will not appear in the TEAM_AREA table until the server updates the data mart. (By default, Rational Team Concert updates the data mart automatically every 24 hours, but administrators can update the snapshots in the data mart manually.)

In some cases, you can choose between data from the data mart and data from the repository. For example, the COMMON_SNAPSHOT snapshot contains two tables with information about Rational Team Concert users:

  • CONTRIBUTOR, which shows information from the data mart
  • LIVE_CONTRIBUTOR, which shows information directly from the repository

Each table provides slightly different information, so be aware of whether you are using live or historical data to avoid introducing conflicts or inconsistencies into your reports.

You can think of the data mart as a cache of the repository data. Accessing the cache instead of the repository directly can be more convenient and can provide better performance. Also, BIRT can take advantage of the data mart as a cache. If you select the Supports Data Caching check box when you upload the report template to the server, BIRT uses only the data from the data mart. Therefore, if your report uses only the tables from the data mart, select this check box; if your report uses any live tables, clear this check box.

Most of the tables that are available to your reports come from the data mart. Most of the live tables have the keyword "live" in the name. These are the live tables in Rational Team Concert 2.0:

  • All of the tables in the LIVE_SNAPSHOT snapshot.
  • In the WORKITEMS_SNAPSHOT snapshot, the following tables:
    • LIVE_WORKITEM_CNT
    • WORKITEM_EXTRA_DATA
    • WORKITEM_QUERY_RESULTS
    • ENUMERATIONS
  • In the APT_SNAPSHOT snapshot, the following tables:
    • CONTRIBUTOR_ABSENCE
    • LIVE_CONTRIBUTOR_ASSIGNMENT
    • LIVE_CONTRIBUTOR_WORKITEM_TIME
    • LIVE_TEAM_CAPACITY


All other tables display data from the data mart.

Data mart terminology

Most Rational Team Concert documents and the UI refer to the data mart as a "data warehouse." Technically speaking, a data warehouse provides historical, aggregated, or modified data from multiple sources, but a data mart provides this type of data from a single source. The distinction is relevant only if you're working with multiple repositories or different products.

These are some of the tables in the WORKITEMS snapshot that show historical information about the work items from the data mart:

WORKITEM_CHNGS

This table (Listing 8) shows information about changes to work items. For example, if you pass a work item number as a parameter, the resulting data set shows the date and time of each change to that work item, along with information about the work item at that time, such as the number of comments and the state of the work item.

Listing 8. Sample data from the WORKITEM_CHNGS table
TIME_ID.TIMESTAMP     WI_ID CONTRIBUTOR_NAME STATE_GROUP  COMMENT_COUNT

Dec 9, 2008 3:37 PM   1234  Bill             OPEN_STATES              0

Apr 14, 2009 4:54 PM  1234  Joe              OPEN_STATES              1

Jun 2, 2009 1:40 PM   1234  Joe              OPEN_STATES              1

Oct 7, 2009 9:32 AM   1234  Joe              OPEN_STATES              2

Oct 30, 2009 1:20 PM  1234  Jane             OPEN_STATES              2

Oct 30, 2009 3:35 PM  1234  Steve            OPEN_STATES              2

Oct 30, 2009 3:50 PM  1234  Steve            CLOSED_STATES            3

Nov 9, 2009 1:20 PM   1234  Steve            CLOSED_STATES            3

As with the live tables, you can pass different parameters and get different information from this table. For example, if you pass a user name as the PREV_OWNER_ID.CONTRIBUTOR_USERID parameter (that is, as the prior owner of the work item), and a different user name as the OWNER_ID.CONTRIBUTOR_USERID parameter (the current owner of the work item), the resulting data set shows all the times that a work item has been transferred from the first user to the second.

NEW_WI_COUNT

This table (Listing 9) shows the number of new work items that were created on any given day, according to the criteria that you specify in the parameters. For example, if you select TIMESTAMP, WI_SEVERITY, and WI_COUNT as the output columns, the data set shows the number of work items of each severity that were created each day.

Listing 9. Sample data from the NEW_WI_COUNT table
TIMESTAMP             WI_SEVERITY  WI_COUNT 
Apr 22, 2009 8:00 PM  Normal       27 
Apr 23, 2009 8:00 PM  Normal       38 
Apr 24, 2009 8:00 PM  Major        4 
Apr 24, 2009 8:00 PM  Normal       12
Apr 25, 2009 8:00 PM  Major        2 
Apr 25, 2009 8:00 PM  Normal       13

If you select the TEAM_AREA_NAME column instead of the severity column, the data set (Listing 10) shows the number of work items created each day according to the team area against which they were created.

Listing 10. Sample data from the NEW_WI_COUNT table
TIMESTAMP             TEAM_AREA_NAME  WI_COUNT 
Jun 25, 2009 8:00 PM  /Team A         1 
Jun 25, 2009 8:00 PM  /Team B         4 
Jun 25, 2009 8:00 PM  /Team C         1 
Jun 26, 2009 8:00 PM  /Team A         2 
Jun 26, 2009 8:00 PM  /Team B         5 
Jun 26, 2009 8:00 PM  /Team C         2

This table stores data from the time that the repository was created; therefore, the resulting data set can be huge. To trim the results down, the NEW_WI_COUNT table includes default parameters called FROM_TIME and TO_TIME, which you can use to specify a date range for the results. You can use JavaScript code in the BIRT expression editor to calculate these ranges, but BIRT includes date, time, and timestamp objects for these parameters. For example, if you want to limit the results to the last 10 days, you can specify BirtDateTime.today() for the TO_TIME and BirtDateTime.addDay(BirtDateTime.today(), -10) for the FROM_TIME (see Figure 7).

Figure 7. Setting the time range for a historical data set
Data Set view showing the Parameters table

These BIRT objects are available in the expression editor under BIRT Functions.

Figure 8. Selecting the BIRT today() function
Shows the 'today() : DateTime' function selected

Reference information on these objects is available in the Eclipse BIRT reference (see the Resources section).

WORKITEM_STATES

Like the NEW_WI_COUNT table, this table (Listing 11) shows information about the number of work items that meet certain criteria at certain points in time. For example, if you select the WI_SEVERITY column, the results show the number of work items with that severity on each day.

Listing 11. Sample data from the WORKITEM_STATES table
TIMESTAMP              WI_SEVERITY   WI_COUNT 
Nov 10, 2009 12:20 PM  Blocker       15 
Nov 10, 2009 12:20 PM  Critical      50 
Nov 10, 2009 12:20 PM  Major         183 
Nov 10, 2009 12:20 PM  Minor         79 
Nov 10, 2009 12:20 PM  Normal        10832 
Nov 10, 2009 12:20 PM  Unclassified  10 
Nov 11, 2009 12:20 PM  Blocker       16
Nov 11, 2009 12:20 PM  Critical      48
Nov 11, 2009 12:20 PM  Major         192 
Nov 11, 2009 12:20 PM  Minor         76 
Nov 11, 2009 12:20 PM  Normal        10882 
Nov 11, 2009 12:20 PM  Unclassified  9

(In this case, you might want to filter closed work items.)

Similarly, you can select the TEAM_AREA_NAME column (Listing 12) to see the number of work items that were associated with each team area on each day.

Listing 12. Sample data from the WORKITEM_STATES table
TIMESTAMP             TEAM_AREA_NAME  WI_COUNT 
Nov 2, 2009 12:05 PM  /Team A         6 
Nov 2, 2009 12:05 PM  /Team B         12 
Nov 2, 2009 12:05 PM  /Team C         3 
Nov 1, 2009 12:05 PM  /Team A         8
Nov 1, 2009 12:05 PM  /Team B         10 
Nov 1, 2009 12:05 PM  /Team C         6

Further information on the tables and snapshots is available on the jazz.net wiki (see Resources).


Other formatting tips and tricks

Linking to work items

It's easy to link from a report to a work item if you have the number of the work item, which is shown as the WI_ID column. For example, if you have a table of work items on a report, you can select any field in that table (even if it's not the WI_ID field) and link it to the corresponding work item.

  1. Add a table of work items to a report.
  2. Select any data field in the table, such as the SUMMARY field.
  3. In the Property Editor view, click the Hyperlink tab.
  4. Click the ellipses (browse, three dots) ... button next to the Link to field.
  5. In the Hyperlink Options window, click URI and insert the following code in the Location field:
    '/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/'+row["WI_ID"]
  6. Click OK.

Work item pop-up windows

In Rational Team Concert dashboards, when you hover your cursor over a link to a work item, a pop-up window appears with information about that work item. You can borrow that code from the dashboard to make pop-ups appear on references to work items in your reports. I haven't been able to get these pop-ups to work as well as on the dashboards (the pop-up shows some messages that aren't supposed to be there), and these pop-ups are not officially supported by Rational Team Concert, but they work well enough for basic use.

Figure 9. A work item pop-up view n a dashboard
Information about the work item in the pop-up view
  1. Click the Master Page tab of the report editor. The Master Page has sections at the top and bottom for header and footer information. You'll import the dashboard code in the header so that the code is imported only once in the report.
  2. From the Palette view, drag a Text field to the header area of the report.
  3. Insert the code shown in Listing 13 in the text field.
Listing 13. Code for work item pop-ups views in reports
<code style="display:none">
<script>


dojo.require("jazz.app.ResourceLink");
dojo.require("jazz.app.proxy");
dojo.require("jazz.app.auth");

this.inherited(arguments);
this._skipOAuth = true;

</script>
</code>
  1. In a data cell in a table on the report, add another Text field. You will use this text field in place of the usual data fields that show information from the data set, such as the summary and ID of work items.
  2. In this text field, enter the following code from Listing 14.
Listing 14. Code for work item popups in reports
<a target="_self" class="jazz-app-ResourceLink" 
id="jazz_app_ResourceLink_<VALUE-OF>row["WI_ID"]</VALUE-OF>" 
href="/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/
<VALUE-OF>row["WI_ID"]</VALUE-OF>">
<VALUE-OF>row["SUMMARY"]</VALUE-OF></a>

<code style="display:none">
<script>
titleLink = 
document.getElementById("jazz_app_ResourceLink_<VALUE-OF>row["WI_ID"]</VALUE-OF>");
new jazz.app.ResourceLink({retainLinkText: true},titleLink);
if (titleLink.lastChild.nodeName == "IMG"){
titleLink.removeChild(titleLink.lastChild);
};
</script>
</code>

This code starts by creating a link to the work item with in an <a> tag. The code assigns a specific ID to the <a> tag. In this case, it creates a unique ID by appending the work item number to the jazz_app_ResourceLink_ string. Note: This ID must be unique for the entire report. If the work item is shown more than once on the report, you must distinguish the IDs somehow.

The second section of the code, within the <code> tag, retrieves that <a> tag according to its unique ID. Then, it creates a JavaScript jazz.app.ResourceLink object that represents the pop-up and links to object to the tag. Finally, there is an if statement that performs some cleanup on the <a> tag output on the report.

The result is similar to the links and pop-ups on the dashboard.


Using other snapshots

This article has focused on the common and work items snapshots because these snapshots provide most of the information used by reports in Rational Team Concert. However, the other snapshots can provide information about other areas of the repository. For more detailed information on the snapshots and the tables within them, see the Rational Team Concert wiki (links are available in the Resources section).

Table 1. Other snapshots of the repository
SnapshotDescription
APT_SNAPSHOTThis snapshot provides information on the assignments of the users and what proportion of their time is assigned to particular pieces of work.
BUILD_SNAPSHOTThe tables in this snapshot contain information about builds and tests on the server.
LIVE_SNAPSHOTThis snapshot provides direct access to the information in the repository. This information is more complicated because the information is indexed by fully qualified class name rather than human-readable labels, but if you can't find what you need in the other snapshots, you might be able to find it here.
REPOSITORY_SNAPSHOTThis snapshot records information about the entire contents of the repository, including dashboards, build results, and change sets. Most of this information is available in the other snapshots.
SCM_SNAPSHOTThe tables in this snapshot contain information about the source control repository, such as the change sets, components, and streams.

Acknowledgements

The author is grateful to Rational Team Concert developers James Moody and Rafik Jaouani for their advice on this article and for the very helpful information that they provide on jazz.net and the jazz.net forums.

Resources

Learn

Get products and technologies

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=495138
ArticleTitle=Creating custom reports with BIRT and Rational Team Concert: Part 3. Advanced reporting techniques
publish-date=06152010