Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get RRC "implements" links from RTC using RPE?

We're using CLM 4.0.2.  We have RTC stories linked to RRC requirements using the "implements" link.  I'm trying to write an RPE template that parses through a set of RTC stories, outputs some basic info about each story, and then outputs the RRC requirement(s) linked to each story.

I know how to query a list of RTC stories and output their basic info.  For example, I can query a data source like:
https://myserver:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[projectArea/name='CCM_Sandbox']/(id|summary)

However, I don't know what field in the work item type exposes the RRC requirement link.  I found a type in the Reportable REST API called "auditableLink" which looks promising in terms of a link to an RRC requirement, but it doesn't have the basic info about the story.

Note that I have experience writing RPE templates for RRC and RQM, but this is the first time I've written one for RTC, so any guidance would be appreciated.

Thanks,
Joe


1

0 votes



2 answers

Permanent link
Your inclination is correct. Find an auditableLink object where the source (or the target) is the work item, and which is of the type you're looking for (whatever the ID for "implementsRequirement" is). The other end of that link will point to the RRC requirement, which you will probabaly need to fetch to get the information you're looking for.

1 vote


Permanent link
Thanks James.  I worked out a solution, and it is in line with your comment.  Here are the specifics of what I did, in case anyone wants to do the same...

I declare two RPE data sources based on the RTC workitem schema (which are added in RPE using the following schema URL: https://myserver:9443/ccm/rpt/repository/workitem?metadata=schema)

The first data source I call "CCM Work Items", and it gets me the ID, summary, description, target iteration, and type of all the work items in my RTC project called "CCM_Sandbox".  The URL address I supply in the RPE document specification for this data source is:
 https://myserver:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[projectArea/name='CCM_Sandbox']/(description|id|summary|target/*|type/*)

The second data source I call "CCM Links", and it gets me the sourceRef and targetRef of all the RTC links of type "implements requirements".  The URL address I supply in the document specification for this data source is:
https://myserver:9443/ccm/rpt/repository/workitem?fields=workitem/auditableLink[name=com.ibm.team.workitem.linktype.implementsRequirement]/(sourceRef/comment|targetRef/uri)

In the RPE template, I start by querying all the work items in "CCM Work Items".  I provide an external variable to let the user specify the iteration name they want to use to filter the work items, and so in the template I only handle those work items where workitem/workitem/target/name equals the value of that external variable.  For each work item found in this query, I query "CCM Links" for a link where the ID of the work item from "CCM Work Items" appears at the start of workitem/auditableLink/sourceRef/comment, followed by a colon.  You can perform that check with the following javascript snippet: if(comment.indexOf(id+":") == 0)

Finally, for each link that matches the above check, I dynamically configure an RRC data source called "RM Text" (based on the schema: https://myserver:9443/rm/publish/text?metadata=schema).  For the dynamic configuration URI of "RM Text", you need to use workitem/auditableLink/targetRef/uri from the "CCM Links" query.  However, that raw value is not in the correct format for an RRC data source.  To get it in the right format, you have to do the following javascript string replacement on workitem/auditableLink/targetRef/uri: uri.replace("/resources/", "/publish/text?resourceURI="), and use that newly updated string as the dynamic configuration URI.

Once you've hit this point, you are home free... "RM Text" is now the requirement that is implemented by the work item.  The approach I've described above is the most efficient way I've found to write the RPE script I was trying to write.

Regards,
Joe

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,020

Question asked: Aug 15 '13, 8:54 p.m.

Question was seen: 8,144 times

Last updated: Jan 06 '18, 7:37 p.m.

Confirmation Cancel Confirm