It's all about the answers!

Ask a question

Fetch changeset details associated to a workitem in Ioperationparticipant

Chandan M B (521959) | asked Jun 30 '15, 9:02 a.m.
edited Jun 30 '15, 9:32 a.m. by Ralph Schoon (58.7k23642)
I need to fetch the changeset details associated to a workitem. I used the workitem references approach of retrieving changeset details. I am stuck in between. Please let me know if the approach is wrong.
Please let me know if there is any better way.

My code look something like this :
IItemHandle referenceItem=null;
            IWorkItemReferences workreferences = (IWorkItemReferences) workItemCommon.resolveWorkItemReferences(newState, null);
            List<IEndPointDescriptor> endpoints = workreferences.getTypes();
            for (IEndPointDescriptor iEndPointDescriptor : endpoints) {
                List<IReference> typedReferences = workreferences.getReferences(iEndPointDescriptor);
                for(IReference ref:typedReferences){
                        referenceItem = ((IItemReference) ref).getReferencedItem();
                        IItemType itemType = referenceItem.getItemType();
                        IChangeSet changeset=itemType.getName();

Be the first one to answer this question!

Register or to post your answer.