How can I use RPE to report on a single RTC Work Item?
- Originally I was using a URI that included all work items in the project. And then using a condition to check for the ID the user was looking for (supplied via an external variable). This obviously made the report incredibly slow as it needed to find the right work item while generating the report.
- Using the steps from RPEActual.com here I was able to configure the metadata on the data source schema. This would allow the user to browse through the work items, select the one they want to report on, and the report would generate the needed URI. This is fairly close to a full solution. However, I'd prefer that this auto-complete or accept a Work Item ID number if the user already has it ready. It's fairly easy to navigate now, but could be cumbersome when it starts housing hundreds of work items.
- Collaborative Lifecycle Management is at version 6.0.3
- RPE Template was made in RPE version 2.1
Peter
3 answers
Hi Peter,
Drag and drop
If you're using RPE 2.1 or higher, you could just drag and drop RTC workitem URL onto RPE Document Studio editor to get an initial template.
See more details https://jazz.net/blog/index.php/2017/01/24/drag-and-drop-rational-publishing-engine-template-design/
The sample RTC template is shipped with RPE as out of the box artifacts.
Build template
If you want to build template yourself, then the following should help.
Schema : https://<clmserver:9443>/ccm/rpt/repository/workitem?metadata=schema
Work item DS url: https://<server:port>/ccm/rpt/repository/workitem/workItem/id/<work item id>
Data source type: REST
Find RTC Rest APIs - https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#workitem
Thanks,
Kumar
For single WorkItem, you can use either of these datasource URIs (assuming WorkItem ID being 123):
https://clm603:9443/ccm/rpt/repository/workitem/workItem/id/123
https://clm603:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[id=123]/*
If user knows the WorkItem ID beforehand, he can just set it for a variable (and need not use metadata configuration). You can modify the template to use variable value in the data source URI.
You can just use a Data Source Configuration element (DSC) in the beginning and using Script Expression, set the URI for DSC. The Script Expression can be simple concatenation like
_baseURL + "/rpt/repository/workitem/workItem/id/" + WorkItemID
where _baseURL is the value of ${public} and WorkItemID is the ID entered by the user.
You may refer the sample template.