It's all about the answers!

Ask a question

How can I use RPE to report on a single RTC Work Item?


Peter Hodges (3316) | asked Feb 06 '17, 10:07 a.m.
Hello all,

Problem

I have an RPE template for a customized work item in RTC. I'd like to be able to run the report on a single work item, preferably being able to launch the report while the work item is open and the report will get its needed context (similar to the functionality in DNG). If this is not possible, I'd like to be able to make it as easy as possible for the end user, by allowing them to specify the Work Item ID when the report is run.

Attempted Steps so Far
  • 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.
Additional Information
  • Collaborative Lifecycle Management is at version 6.0.3
  • RPE Template was made in RPE version 2.1
How do others typically report on a single work item?

Thank you for your time,
Peter

3 answers



permanent link
Kumaraswamy Gowda (3915) | answered Feb 06 '17, 11:13 a.m.

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


Comments
Peter Hodges commented Feb 06 '17, 12:38 p.m.

 Thanks Kumar,


But I already have a RPE template built and working.

My issue is making it as easy as possible for the end-user to run it as an RTC report without providing it a URI.

Peter


permanent link
Subramanya Prasad Pilar (4.5k14) | answered Feb 06 '17, 12:49 p.m.

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.


Comments
Peter Hodges commented Feb 06 '17, 12:54 p.m.

 Thanks Subramanya,


I'm currently using the first URI that you listed.

I would like to look at what you suggest. The user would know the WorkItem ID. Do you know of any resources or examples of modifying the template to use the variable value?

Thank you,
Peter


permanent link
Subramanya Prasad Pilar (4.5k14) | answered Feb 06 '17, 1:08 p.m.
edited Feb 13 '17, 5:33 a.m.

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.

Your answer


Register or to post your answer.