How to get linked SVN revision URI via RTC Java API?
I'm looking for a way to use Java API to extract all the SVN revision URIs attached to an RTC workitem.
workItemCommon.resolveWorkItemReferences(workitem, null); but the link to SVN revision is not among the references I get. So what can I do to get these URIs via Java API? Upd: this is about RTC 4.0.2 SDK, client API. |
Accepted answer
One other answer
Ralph Schoon (63.5k●3●36●46)
| answered Jul 18 '13, 3:58 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
As you have already understood, that is most likely a link. See https://rsjazz.wordpress.com/2012/10/20/following-calm-links-using-the-java-client-or-server-api/ and other posts on that blog for how to work with links.
Comments I would be puzzled if it was no link. The other SCM references are links as well. Consider to parse all links. There are different link types and different ways how links are used. E.h. WorkItem Link Tpyes and CLM link types are handled differently.
Serghei Zagorinyak
commented Jul 18 '13, 5:02 a.m.
Hi, Ralph. I'm probably missing something here. I looked through examples in your blog and there you use IWorkItemCommon to get workitem references and further process them. My problem is that when I get this list of all references, reference to the svn revision is not there. For example, I created a workitem with a single parent reference and a single svn revision reference. When I get the list of IReference objects from a workitem as stated in the question, it contains a single item - the parent reference. I also looked through reference types and link types available and couldn't find a type similar to SVN_REVISION. Btw, this is about RTC 4.0.2 SDK, client app. Too bad, I can't test that currently.
// get all references from the work item workingcopy IWorkItemReferences references = workingCopy.getReferences();Or the code you used up there. I then iterated all the endpoint types in the references. I did not have SVN links, mind you, but I would have expected them to show up if I did. Unfortunately I don't have time to test your scenario right now. Maybe someone else can chime in?
Serghei Zagorinyak
commented Jul 26 '13, 4:14 a.m.
Unfortunately, the IBM Rational Software Support was unable to help us with an answer so we're still looking for a way get these links to SVN revisions. Is there a chance you could look into the case? I can't. I would have to setup SVN and make it work. I don't have the time to do that right now. I asked a colleague who is looking into SVN links for other reasons.He might have some code. However, from talking to him, SVN links should be accessible by the code I shared on my blog in these posts: http://rsjazz.wordpress.com/tag/links/
|
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.