It's all about the answers!

Ask a question

Receiving error while trying to fetch associated work item information in RPE.


Anjuri Kelaiya (3732) | asked Dec 20 '18, 7:14 a.m.

I want to generate RPE report for a specific work Item and it should fetch all associated work items with the parent work item.

I have created a template and added datasource as  https://server:port/ccm/rpt/repository/workitem/workItem/id/[ItemID]. 
It is working fine when I am fetching only basic information like summary and description of the main work item.
But when I am adding workitem/auditableLink/targetRef to fetch associated work item(s) information, document generation process gets aborted with errors.
do I need to use different URI  to get the associated work item information am I missing something in the template?

I could have pasted screenshot of the template  but I am not able to add an image here.
Any help would be appreciated,

Accepted answer


permanent link
Subramanya Prasad Pilar (4.6k16) | answered Dec 21 '18, 12:56 a.m.
What is the error you are getting? Are you using any filters in the query? Note that RTC does not support native filtering on some fields.
Normally in the document specification, for RTC Workitems schema you should set Data Source URI as https://server:port/ccm/rpt/repository/workitemand RPE will append fields parameter based on the attributes used in RPE template.

You can get these details on associated WorkItem(s) by querying on workitem/workItem/auditableLinks.
For example, to get parent workItems, you can use the following filter:
name == "com.ibm.team.workitem.linktype.parentworkitem"
You can reconfigure the (another) data source by setting its URI to workitem/workItem/auditableLinks/targetRef/referencedItem/reportableUrl
and then print the parent workitem details.
Anjuri Kelaiya selected this answer as the correct answer

Comments
Anjuri Kelaiya commented Dec 21 '18, 3:11 a.m.

I am trying to implement aforementioned template but not sure which dynamic data source you have used as _relWorkItem. 

It doesn't look like predefined schema.
Could you please let me know on that?


Subramanya Prasad Pilar commented Dec 21 '18, 5:00 a.m.

You can select "Duplicate Schema..." in outlook view to create another copy of schema with a different name. Since associated work item is another WorkItem, we are using another workItem schema.


Anjuri Kelaiya commented Dec 21 '18, 6:44 a.m.

Thanks Subramanya,


I have replicated same template as shown above, provided data source URI as https://myserver:port/ccm/rpt/repository/workitem/workItem/id/83 for RTC_workitems 
and  https://myserver:port/ccm/rpt/repository/workitem/workItem/auditableLinks/targetRef/referencedItem/reportableUrl for another datasource.

Output which I am getting is:

83-Anjuri_Test
Parent Workitem:
83-Anjuri_Test

It is not providing associated parent work item's information. it is only repeating main work item's(ID=83) information. 



Subramanya Prasad Pilar commented Dec 21 '18, 9:27 a.m.
That means you have not configured the new data source correctly. Set "URI" for the Data Source Configuration element to
workitem/workItem/auditableLinks/targetRef/referencedItem/reportableUrl
so that the second data source will request data referenced workitem (instead of same workitem)

Anjuri Kelaiya commented Dec 24 '18, 1:13 a.m.

Still no luck. 

When I am setting up URI for data source configuration element as workitem/workItem/auditableLinks/targetRef/referencedItem/reportableUrl, document generation process gets aborted with the following error.

CRRPE3018I The data source configuration RTC Workitems is reconfiguring data source _relworkItem.
CRRPE1064I Data source _relworkItem using URL https://myserver:port/ccm/rpt/repository/workitem/workItem/auditableLinks/targetRef/referencedItem/reportableUrl?fields=workitem/workItem/(id%7Csummary)
CRRPE3107I Downloading data from https://myserver:port/ccm/rpt/repository/workitem/workItem/auditableLinks/targetRef/referencedItem/reportableUrl?fields=workitem/workItem/(id|summary).
Dec 24, 2018 11:30:20 AM org.apache.http.client.protocol.ResponseProcessCookies processCookies


Anjuri Kelaiya commented Dec 24 '18, 1:13 a.m.

 WARNING: Invalid cookie header: "Set-Cookie: WASReqURL=""; Expires=Thu, 01 Dec 1994 16:00:00 GMT; Path=/; Secure; HttpOnly". Invalid 'expires' attribute: Thu, 01 Dec 1994 16:00:00 GMT

CRRPE3617I Data request time for artifact - https://myserver:port/ccm/rpt/repository/workitem/workItem/auditableLinks/targetRef/referencedItem/reportableUrl?fields=workitem/workItem/(id%7Csummary) : 0.406 seconds
CRRPE3107I Downloading data from https://myserver:port/ccm/rpt/repository/workitem/workItem/auditableLinks/targetRef/referencedItem/reportableUrl?id=_Mbf5gAdBEem8qtT6rO3prA&fields=workitem/workItem/(id|summary)&size=100&pos=100.
CRRPE3118I Page 1 of the response is being processed.
CRRPE3119I Page https://myserver:port/ccm/rpt/repository/workitem/workItem/auditableLinks/targetRef/referencedItem/reportableUrl?id=_Mbf5gAdBEem8qtT6rO3prA&fields=workitem%2FworkItem%2F%28id%7Csummary%29&size=100&pos=100 of the response is next to load.
CRRPE1064I Error in engine
Can not access to the OAuthentication URL.
CRRPE1064I Aborting engine execution...


Anjuri Kelaiya commented Jan 10 '19, 8:24 a.m.

Thanks Subramanya,


It started working after setting workitem/workItem/targetref/referencedItem/reportableUrl.



showing 5 of 7 show 2 more comments

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.