How do you pull defect/work item comments into reports in RPE/RRDI?
Accepted answer
The work item comments are not stored in the data warehouse, so they're not available in RRDI reports at all (as mentioned in the other answer, only the comment count is stored).
The comments are available via the reportable REST API however, so they could be included in an RPE report. For example, the following URL would pull all work items with their comments:
https://<server>:<port>/ccm/rpt/repository/workitem?fields=workitem/workItem/comments/*
Comments
Thank you Alanna! This is exactly what I was looking for. Is there a data dictionary-style reference for URLs like the one above? The Data Dictionary seems to be missing references like the one you provided.
Yes, the data dictionary is a bit more geared towards data warehouse reporting, rather than live (RPE) reports. For the reportable REST, take a look at this info center topic:
https://www-01.ibm.com/support/knowledgecenter/SSYMRC_5.0.2/com.ibm.team.reports.doc/topics/r_ccm_rest_api.html
It links to some wiki pages that go into more detail about how to use the reportable REST API for RTC, and what kind of info is available. Unfortunately, it looks like the wiki pages aren't completely up to date. The best way to see exactly what data is currently available via the reportable REST is to take a look at the schema (as described here - https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#Getting_a_schema_for_a_resource).
One other answer
Discussion (# comments) is already loaded by OOTB configuration. See the link below. Is this what you are after?
http://www-01.ibm.com/support/knowledgecenter/SSYMRC_5.0.2/com.ibm.team.reports.doc/topics/ccm/Work-Item.html
If so, it is quite straight-forward.
From Query Studio (RRDI), drag and drop data item Operational Data Store/Request Area/Comment Count into the table. You will see a list of comments.
From RPE, define a datasource schema for RTC workitem (https://server:9443/ccm/rpt/repository/workitem?metadata=schema), and you will see workitem/workItem/commentCount. Drag and drop into Container to make a query.