It's all about the answers!

Ask a question

Fetch changeset details associated to a workitem in Ioperationparticipant


Chandan M B (1133774) | asked Jun 30 '15, 9:02 a.m.
edited Jun 30 '15, 9:32 a.m. by Ralph Schoon (63.1k33646)
Hi,
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){
                    if(ref.isItemReference()){
                        referenceItem = ((IItemReference) ref).getReferencedItem();
                        System.out.println(referenceItem);
                       
                        IItemType itemType = referenceItem.getItemType();
                        System.out.println(itemType.getName());
                        IChangeSet changeset=itemType.getName();
                    }
                }
            }

Be the first one to answer this question!


Register or 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.