It's all about the answers!

Ask a question

Using Plain Java API to link RTC story to RQM test case problem

Bob Wang (482119) | asked Sep 04 '12, 11:54 a.m.
I have the following code to link the RQM test case to an existing RTC story. When I run the program, I noticed that the RQM test case link was added to RTC story, but it shows the full URL instead of the test case name. when I go to RQM test case, I couldn't see the RTC story link in development item section. 

However,  if I link them manually, it shows the test case name in RTC story, and the RTC story link shows up in the RQM test case in development item section. 

Is there a way to resolve the test case name automatically and do bi-direction link?

URI uri = new URI(tcURL);
IEndPointDescriptor endpoint = ILinkTypeRegistry.INSTANCE

IWorkItemClient service = (IWorkItemClient) repo

IWorkItem workItem = service.findWorkItemById(storyId,
IWorkItem.FULL_PROFILE, monitor);

IReference reference = IReferenceFactory.INSTANCE

IWorkItemWorkingCopyManager wcm = service
wcm.connect(workItem, IWorkItem.FULL_PROFILE, monitor);

try {
WorkItemWorkingCopy wc = wcm.getWorkingCopy(workItem);
wc.getReferences().add(endpoint, reference);
IDetailedStatus s =;

if (!s.isOK()) {

throw new TeamRepositoryException("Error saving work item",



} finally {

One answer

permanent link
Paul Slauenwhite (8.4k12) | answered Sep 05 '12, 9:51 a.m.
edited Sep 05 '12, 10:21 a.m.
I am not an expert on the RTC API, but your work item reference does not have a title.

For the backlink in RQM, you need to use the OSLC QM API (see;up=#Resource_TestCase).  Note, for the RQM Reportable REST API.

Your answer

Register or to post your answer.