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

how to get changeset info by workitem changeset references use RTC server SDK

 i can get the workitem changeset references by the next code,but how to get the workitem-related changeset info


IWorkItemReferences References = workItemCommonsServer.resolveWorkItemReferences(oldWorkItem,monitor);
 List<IReference> referencesChangeSetList = References.getReferences(endPointDescriptor); 
         for (IReference iReferencea : referencesChangeSetList) {
//String changeSetComment = "Changes in: Test- <No Comment> - jtsadmin - Sep 29, 2019 4:30 PM";

}

0 votes

Comments

Not sure what you ask. 

 

use RTC-SDK-Server-6.0.6.1 ,How to get the content of a change set , which is linked to a work item

 i have got workitem's IWorkItemReferences   , how to get IChangeSet  from IWorkItemReferences


Accepted answer

Permanent link
List<IChangeSetHandle> csHandles = new ArrayList<IChangeSetHandle();
for (IReference ref : references) {
   if (ref.resolve() instanceof IChangeSetHandle) {
      csHandles.add((IChangeSetHandle) ref.resolve());
   }
}
if (!csHandles.isEmpty()) {
   // Fetch the full IChangeSets from the repo
}
Gou Peng selected this answer as the correct answer

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
× 10,936
× 149
× 102

Question asked: Oct 01 '19, 6:24 a.m.

Question was seen: 2,090 times

Last updated: Oct 01 '19, 10:24 a.m.

Confirmation Cancel Confirm