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

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.

0 votes



One answer

Permanent link

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

}


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

Question asked: Apr 26 '21, 9:50 p.m.

Question was seen: 601 times

Last updated: May 19 '21, 1:23 a.m.

Confirmation Cancel Confirm