WorkItem details from Changeset ID
Accepted answer
If the change-set has a work-item associated, you can retrieve the work-item information using the ILinkServiceLibrary.class service:
ILinkService linkService = getService(ILinkService.class);
ILinkServiceLibrary linkServiceLibrary = (ILinkServiceLibrary) linkService.getServiceLibrary(ILinkServiceLibrary.class); ILinkCollection csLinks = linkServiceLibrary.findLinks(ILinkConstants.CHANGESET_WORKITEM_LINKTYPE_ID, reference).getAllLinksFromHereOn(); // ...
If you know the UUID of the change-set, you can create the reference to it as:
UUID uuid = UUID.valueOf("_GnlR8RwDEeO-t7oYqwMn0H");
IChangeSetHandle csH = (IChangeSetHandle)IChangeSet.ITEM_TYPE.createItemHandle(uuid, null);
IReference reference = IReferenceFactory.INSTANCE.createReferenceToItem(csH);
Cheers.