How to get all the changes made in a work item by using server side Plugin in ccm.
Hi,
I had a work item in that I will make some changes and save it. When I save the work item a mail will send in that mail I need to get what are all changes made in work item. How to achieve this using server side Plugin. I am able to send a mail but I am not getting how to get all changes done in the work item before saving the work item. Any Suggestion please.
Thank you,
Regards,
Pavan m.
|
One answer
ILinkServiceLibrary linkService = (ILinkServiceLibrary) getService(ILinkService.class).getServiceLibrary(ILinkServiceLibrary.class); IItemReference workItemReference = IReferenceFactory.INSTANCE.createReferenceToItem(workItemHandle); ILinkQueryPage page = linkService.findLinks(ILinkConstants.CHANGESET_WORKITEM_LINKTYPE_ID, workItemReference); ILinkCollection links = page.getAllLinksFromHereOn();
List<IChangeSetHandle> changeSets = new ArrayList<IChangeSetHandle>(); for (ILink link : linkCollection) { IChangeSetHandle csHandle = (IChangeSetHandle) ((IItemReference) link.getSourceRef()).getReferencedItem(); changeSets.add(csHandle); }
|
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.