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

Programmatically link ChangeSet to WorkItem

Hi,

I'm using the Plain Java Client to create Work Items and Change Sets. I'd like to know how to create and save a link between a WorkItem and ChangeSet.

I've had a look at some of the classes, and tried to do it using the IFilesystemWorkItemService, however a null pointer is thrown on the second statement here as fswis is null.

IFilesystemWorkItemService fswis = (IFilesystemWorkItemService)teamRepository.getClientLibrary(IFilesystemWorkItemService.class);

ILink[] links = fswis.createLink(workspace.getResolvedWorkspace(),
cs, new IWorkItemHandle[] {(IWorkItemHandle)workItem.getItemHandle()},
null);

Any help/advice would be much appreciated.

Simon

1 vote



3 answers

Permanent link
For information about the format of the SCM command, "add work item," see http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m6/index.jsp?topic=%2Fcom.ibm.team.scm.doc%2Ftopics%2Fadd_workitem.html.

1 vote


Permanent link
Tibor,

working with RTC 4.0.5 I see that IFileSystemWorkItemManager is taken from com.ibm.team.filesystem.client.workitems_3.1.400.v20130614_0105.jar which is part of my PlainJava download.

With this I am successfully able to programmatically link change sets and work items on the client side:
IFileSystemWorkItemManager fswim = (IFileSystemWorkItemManager)teamRepository.getClientLibrary(IFileSystemWorkItemManager.class);
fswim.createLink(workspaceHandle, changeSetHandle, myWIHandles, monitor);
where myWIHandles is an array over IWorkItemHandles

If this solves your programming challenge, please mark it as accepted answer.

- Arne

1 vote


Permanent link
Hi
The creation of links can be restricted to the component that defines the link type. In that case it is Filesystem (Source Control). This means that you have to create the link using Source Control API. A starting point can be IFileSystemWorkItemManager.

Regards

Marcel
Jazz Work Item team

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,937
× 1,381

Question asked: May 27 '09, 1:12 p.m.

Question was seen: 9,404 times

Last updated: Apr 02 '14, 10:17 a.m.

Confirmation Cancel Confirm