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

Fetch changeset details associated to a workitem in Ioperationparticipant

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

0 votes


Be the first one to answer this question!

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

Question asked: Jun 30 '15, 9:02 a.m.

Question was seen: 1,775 times

Last updated: Jun 30 '15, 9:32 a.m.

Confirmation Cancel Confirm