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
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
3 answers
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:
If this solves your programming challenge, please mark it as accepted answer.
- Arne
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