The canned data model in Rational Reporting for Development Intelligence (RRDI) pulls in most custom attributes added to Rational Team Concert, Rational Quality Manager or Rational Requirements Composer projects in the Operational Data Stores “Extension” query subjects. Here is an example documented in the CLM Infocenter that shows how to extract a custom attribute defined for a Test Case in Rational Quality Manager. While running the CLM 2011 reporting workshop I got asked to show how this can be applied to a custom attribute added to an RTC work item and a custom attribute added to an RRC requirement type. As the workshop is also an exploration of the tools RRDI provides report authors – Query Studio and Report Studio – I showed two different ways of getting at these custom attributes, at the same time showing off how to use these two tools in concert (pun intended:-).
One easy way to get to those custom attributes in RTC work items is to start with Query Studio, setup a query that extracts the attributes of interest and then use the query in Report Studio to present it with bells and whistles if required. To begin I assume that my RTC “Defect” work item type has a custom string attribute with ID “com.ibm.team.apt.attribute.mystring“.
I’ve also created one or two sample Defects with some text in the custom attribute so I have something to show when creating reports:
I now launch the RRDI interface (aka “Cognos Connection”)from the RTC Reports menu on the web:
Then I start Query Studio from the Launch menu. I just want to create a simple list report that shows the values of the Id, Summary, Status and “My String Attribute” attributes. First I insert the “Request ID“, “Name” and “Request Status” attributes of the Request query subject and sort by Request ID in descending order (not required, but sorting it this way lets me see my new work items at the top of the list) :
While we’re there, notice the other query subjects ending in “Extension”: there are subjects for most other custom attribute types, including Integer, Long and Large String. The CCM Data dictionary is a valuable resource that shows how custom attributes (and other attributes) are surfaced in RRDI.
Now that I have a simple list I open it in Report Studio for further editing and formatting.
First I’ll make a cosmetic edit and change the “Name2” column heading to “Custom Attribute Name“.
Now (the important bit) I need to filter out all custom attributes except my custom string attribute. Report Studio makes it a breeze to do this. Open the “Query” query for editing and drag the “Custom Attribute Name” data item to the “Detail Filters” pane to display the “Detail Filter Expression” dialog.
Next I place the cursor to the right of [Custom Attribute Name] and double-click the “=” operator (or you could just type it in:-) from the Functions tab.
Let’s say I haven’t the best short term memory in the world and I’ve forgotten exactly how to spell the id of my custom attribute. Report Studio allows me to be forgetful: I just go to the Data Items tab in the expression editor, select “Custom Attribute Name” and click the “Select Value” icon to have Report Studio show all available custom attribute names and double-click “com.ibm.team.apt.attribute.mystring” to add it to the filter expression which now reads “[Custom Attribute Name]=’com.ibm.team.apt.attribute.mystring'”.
I click OK to add the new expression to the Detail Filter, run the report and presto I have a (yes, very simple) report that shows my custom attribute.
Obviously both Query Studio and Report Studio can do way more than what I’ve shown here but the object of this exercise was to show one way of getting to custom attributes in RTC.
Next up: a slightly more complex example showing how to dig custom attributes out of RRC.