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

How to get the changes in an eclilpse plugin on delivery

 Hi Forum,

I have managed to create a server-side plugin when a user delivers something.
I dont know how to get the changes within the changeset?

this is the code to list the changesets:

DeliverOperationData data = (DeliverOperationData) operationData;
       List<?> changeSetHandles = data.getChangeSetHandles(); 
How can i see what's in the changesets?
(when an enterprise extension named 'naming convention' is changed, the delivery should be blocked)

0 votes



One answer

Permanent link
Maybe this helps? https://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/, however it looks only at the change sets. There are however other posts that look a bit deeper at SCM: https://rsjazz.wordpress.com/?s=scm

0 votes

Comments

 Hi Ralph. I have read the posts you suggested and am able to get the IChangeSethandle interfaces, but i still do not see what changes are made on the files... Can you provide me with some more information please? 

Handles are persistent pointers to objects.. to get the actual object, you need to use one of the Auditable resolvers to get the data out of the database..

here is a call I use in one server side plugin.. this for workitem related info
// Get the full state of the parent work item so we can edit it
            IWorkItem workingCopy = (IWorkItem) fWorkItemServer.getAuditableCommon().resolveAuditable(workItem, IWorkItem.FULL_PROFILE, monitor).getWorkingCopy();

and here using the item service
fItemService = getService(IRepositoryItemService.class);
IProjectArea projectArea = (IProjectArea) fItemService.fetchItem(operation.getProcessArea().getProjectArea(), new String[]{IProjectArea.NAME_PROPERTY_ID});

then the objects are populated and you use the object class instead of the object HANDLE class.

I only have what I blogged about, sorry. Another source, maybe could be http://thescmlounge.blogspot.de/ , maybe if you search the web, there could be code snippets out there.

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,938

Question asked: Feb 03 '15, 10:32 a.m.

Question was seen: 3,007 times

Last updated: Feb 04 '15, 2:16 a.m.

Confirmation Cancel Confirm