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

How to RTC a workitem link a RRC artifact in program

Now we have the RRC artifact link and document URL is also exist. In RTC, how to a workitem link the RRC artifact ? Is there any API to reuse?
Many thanks.

0 votes


Accepted answer

Permanent link

Hi, this depends on what you want to do. Here is a summary with references:
https://rsjazz.wordpress.com/2012/10/20/following-calm-links-using-the-java-client-or-server-api/

here the referenced links.
https://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/
https://rsjazz.wordpress.com/2012/09/20/the-rtc-workitem-server-link-api-linking-to-work-items-and-other-elements/

Note, Wordpress appears to be blocked in China, what you can try is the approach below. At least from Hong Kong this appears to work:
.
In case of WordPress blogs, you can append the string ".nyud.net" to the blog URL and it should open just fine. For instance, if the main blog is located at labnol.wordpress.com, you can access a mirror image of this site from labnol.wordpress.com.nyud.net.


Debo Xiong selected this answer as the correct answer

0 votes

Comments

Sorry I can not access any of them, is there any detail sample for this solution ? I think 'link for OSLC' is often needed since 3.x

All my detail samples are on that blog. If you can't access it, you can try to follow Lauren's suggestion.

Hi Ralph,
Thanks very much for your link, i can access them now. One questions about the code:
IReference source = refFactory.createReferenceToItem(parent);
IReference target = refFactory.createReferenceToItem(blocked);
Now my source is a URL string about a artifact in RRC, and target is a workitem in RTC. My question is how to transfer the URL string in RRC to IItemHandle format ? I am newer about this part, very appreciate your always support.

Please see the answer  (limits on comments). How did you get at the link? I would like to be able to provide that trick to others.

Yes, I already got the RRC artifact like this :
https://localhost:9443/rm/resources/_zSZUYC7REeKQxbmS_9nbjw

I was actually asking how you managed to reach Wordpress 8-)

Hi Ralph,
Thanks so much for your help. It works now.

showing 5 of 7 show 2 more comments

2 other answers

Permanent link
Hi, this is kind of hidden but explained using this code to call the client api:

reference = IReferenceFactory.INSTANCE.createReferenceFromURI(new URI("https://clm.example.com:9447/qm/oslc_qm/contexts/_Lm2UIACBEeGZqMjM3RLKTw/resources/com.ibm.rqm.planning.VersionedTestCase/_dJzNgQCBEeGZqMjM3RLKTw"));
workingCopy.getReferences().add(ILinkTypeRegistry.INSTANCE
    .getLinkType(WorkItemLinkTypes.TESTED_BY_TEST_CASE).getTargetEndPointDescriptor(),reference);


You create a URI from the URL: new URI("https://clm.example.com:9447/qm/oslc_qm/contexts/_Lm2UIACBEeGZqMjM3RLKTw/resources/com.ibm.rqm.planning.VersionedTestCase/_dJzNgQCBEeGZqMjM3RLKTw")

Then you create a reference from this URI.
reference = IReferenceFactory.INSTANCE.createReferenceFromURI(new URI("https://clm.example.com:9447/qm/oslc_qm/contexts/_Lm2UIACBEeGZqMjM3RLKTw/resources/com.ibm.rqm.planning.VersionedTestCase/_dJzNgQCBEeGZqMjM3RLKTw"));

Here some other code that does the same:

IEndPointDescriptor endpoint3 = ILinkTypeRegistry.INSTANCE.getLinkType(WorkItemLinkTypes.AFFECTED_BY_DEFECT).getTargetEndPointDescriptor();
LinkURIOperation linkOp = new LinkURIOperation(endpoint,uri);

With this code the LinkURIOperation does:

 reference = IReferenceFactory.INSTANCE.createReferenceFromURI(fURI);
 workingCopy.getReferences().add(fEndpointDescriptor,reference);


2 votes


Permanent link
Hi,

I believe it is possible to link from a work item to a RRC artifact using OSLC.  https://jazz.net/forum/questions/87628/linking-two-artifacts-using-rrc-api has more infomration.

0 votes

Comments

Hi ,
can you share more information ?

Hi,
Did you look at Gabriel's response in the forum post I linked to?

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,030

Question asked: Nov 20 '12, 5:44 a.m.

Question was seen: 6,294 times

Last updated: Nov 20 '12, 8:58 p.m.

Confirmation Cancel Confirm