It's all about the answers!

Ask a question

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


Gou Peng (211) | asked Oct 01 '19, 6:24 a.m.

 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";

}


Comments
Ralph Schoon commented Oct 01 '19, 7:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Not sure what you ask. 


Gou Peng commented Oct 01 '19, 8:51 a.m. | edited Oct 01 '19, 10:24 a.m.

 

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
David Lafreniere (4.4k7) | answered Oct 01 '19, 9:55 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
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

Your answer


Register or to post your answer.