How to find the Author and WI associated to change set using plain java Api
![]() Hello,
I want to get report with change set comment,author, date of checkin, and summary of WI associated with it.
|
2 answers
![]() Assuming you got an IChangeSet cs, you can retrieve the author this way: IContributorHandle authorHandle = cs.getModifiedBy();
I have no examples of retrieving the work item associated to a change set using plain Java API, but I think that this example that makes use of server side Java API can be adapted to plain Java API:
AbstractService abstractService = ....; linkService = abstractService.getService(ILinkService.class); IItemReference changeSetRef = IReferenceFactory.INSTANCE.createReferenceToItem(cs); Comments
Thanks for answer
But user name i get it in uuid format not proper name or ID.
I will try to get the link WI.
The Java API usually returns handles and you have to resolve the handle, to get all the data. See https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ for some introduction. On that blog are many examples with code. You can search also e.g. for IContributorHandle and find code that uses this. |
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Jul 12 '21, 2:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER See https://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/ for the genral approach. That is however server API. Instead of WorkItemService you want to use the IWorkitemCommon or IWorkItemClient and instead of the itemservice you use the ITeamRepository you get. Also see
for client link APIs.
|
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.