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

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

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

0 votes



5 answers

Permanent link
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

0 votes


Permanent link
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

0 votes


Permanent link
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

0 votes


Permanent link
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

0 votes


Permanent link

  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);

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
× 10,927

Question asked: May 22 '12, 11:12 a.m.

Question was seen: 8,863 times

Last updated: Oct 13 '19, 1:32 a.m.

Confirmation Cancel Confirm