It's all about the answers!

Ask a question

How to create a SVN revision link in workitem using plain Ja


Satoshi Tanaka (311210) | asked May 22 '12, 11:12 a.m.
Hi,

I tried to create a SVN revision link in workItem by using plain Java SDK.
I know that there is SVN bridge integration feature in RTC. however I'd like to do the same thing by using plain Java SDK.

In the code, what link type should be used for SVN revision type?
I checked the workitem which has a link to SVN revision via RESTClient, and then I found "com.ibm.team.scm.svn.linkType.workItem.s" link type in the XML body of the workItem.

however, I couldn't find it in the WorkItemLinkTypes.

my questions are:

1. what LinkType should I use for SVN revision? (com.ibm.team.scm.svn.linkType.workItem.s)

2. could you provide sample spinet codes?

Thank you

5 answers



permanent link
Satoshi Tanaka (311210) | answered May 25 '12, 2:51 a.m.
Hi,

I tried to create a SVN revision link in workItem by using plain Java SDK.
I know that there is SVN bridge integration feature in RTC. however I'd like to do the same thing by using plain Java SDK.

In the code, what link type should be used for SVN revision type?
I checked the workitem which has a link to SVN revision via RESTClient, and then I found "com.ibm.team.scm.svn.linkType.workItem.s" link type in the XML body of the workItem.

however, I couldn't find it in the WorkItemLinkTypes.

my questions are:

1. what LinkType should I use for SVN revision? (com.ibm.team.scm.svn.linkType.workItem.s)

2. could you provide sample spinet codes?

Thank you


I think that we can add the references by using the following code.
but, I'm not sure what kind of link type should be specified for SVN revision type. so, could you pls let me know the linkType value (class).

WorkItemCopy.GetReferences().add(WorkItemEndPoints.xxxx, reference)

Thank you so much

permanent link
Glenn Bardwell (58621527) | answered May 29 '12, 11:05 a.m.
JAZZ DEVELOPER
Hi,

I tried to create a SVN revision link in workItem by using plain Java SDK.
I know that there is SVN bridge integration feature in RTC. however I'd like to do the same thing by using plain Java SDK.

In the code, what link type should be used for SVN revision type?
I checked the workitem which has a link to SVN revision via RESTClient, and then I found "com.ibm.team.scm.svn.linkType.workItem.s" link type in the XML body of the workItem.

however, I couldn't find it in the WorkItemLinkTypes.

my questions are:

1. what LinkType should I use for SVN revision? (com.ibm.team.scm.svn.linkType.workItem.s)

2. could you provide sample spinet codes?

Thank you

permanent link
Glenn Bardwell (58621527) | answered May 30 '12, 11:32 a.m.
JAZZ DEVELOPER
Hi

You can use the RTC Eclipse thick client to create link filters. The user interface displays the full list of filters. Clicking on an item adds it to the filter list. You can use the Web UI to view the filters.

From the Web UI the form of the links is

The link filter from SVN links is
com.ibm.team.scm.svn.linkType.workItem

permanent link
Satoshi Tanaka (311210) | answered May 30 '12, 11:44 a.m.
Hi

You can use the RTC Eclipse thick client to create link filters. The user interface displays the full list of filters. Clicking on an item adds it to the filter list. You can use the Web UI to view the filters.

From the Web UI the form of the links is

The link filter from SVN links is
com.ibm.team.scm.svn.linkType.workItem


Hi, Thank you for the reply.
but I'd like to create a link using Plain Java SDK (API) program.
Which class(package) should I used for svn link?
and if possible, could you please provide a sample code?

Thank you

permanent link
Gou Peng (216) | answered Oct 13 '19, 1:32 a.m.

  ILinkType SVNELinkType = ILinkTypeRegistry.INSTANCE.getLinkType("com.ibm.team.scm.svn.linkType.workItem");

IReference targetEndpoint;
try {
targetEndpoint = IReferenceFactory.INSTANCE.createReferenceFromURI(new URI(currentConfigDownloadUrl), "<<"+current_componentName+">>--基线版本:"+current_baselineName);
 IReferenceFactory refFactory = IReferenceFactory.INSTANCE;
 IReference target = refFactory.createReferenceToItem(newWorkItem);
 // get the link service to have access to the ILinkServiceLibrary
 ILinkService linkService = getService(ILinkService.class);
 // get the ILinkServiceLibary
 ILinkServiceLibrary linkServiceLibrary = (ILinkServiceLibrary) linkService
.getServiceLibrary(ILinkServiceLibrary.class);
 // Create the link
 ILink link = linkServiceLibrary.createLink(
 SVNELinkType , targetEndpoint, target);
 // Save the link
 linkServiceLibrary.saveLink(link);

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.