How to get creator Id using plain Java api?
![]()
Hi I am trying to get creator ID from workItem .
When i use the method WorkItem.getCreator() I get the following message com.ibm.team.repository.common.model.impl.ContributorHandleImpl@262b2 62b (stateId: <unset>, itemId: [UUID _noTKsbToEeCJhYt-X0WSYQ], origin: com.ibm.t eam.repository.client.internal.TeamRepository@20772077, immutable: true) Please suggest me how i can pull the creator name or email Address from the work Item. Any suggestions are welcome Thanks Kishan |
Accepted answer
![]()
you need to convert the handle into a IContributor object
IContributor User = (IContributor) teamRepository.itemManager().fetchCompleteItem( IContributorHandle, IItemManager.DEFAULT. monitor); print user.getName(); kishan adhi selected this answer as the correct answer
|
One other answer
![]()
Thanks Sam, it worked for me too. I fixed punctuation a little ;)
IContributorHandle creator = attachment.getCreator(); IProgressMonitor monitor = new SysoutProgressMonitor(); IContributor user = (IContributor) teamRepository.itemManager() |