[closed] Getting Java class cast exception
I want to get the owner ID of the work item. I used the below snippet to get the ID . But i end up with an error java class cast exception,
IContributor contributor = (IContributor) teamRepository.itemManager()
.fetchCompleteItem(handle, IItemManager.DEFAULT, null);
String userID=contributor.getUserId();
Please help me how to get Owner ID from Icontributor handle.
Please any one clarify the difference between Owner and Creator of work item in RTC.
Waiting forward for response...
Thanks in advance,.
The question has been closed for the following reason: "Duplicate Question" by rschoon Feb 01 '17, 7:41 a.m.
One answer
See https://rsjazz.wordpress.com/2014/05/26/only-owner-can-close-workitem-advisor/ to understand how to get the owner.
IContributorHandle owner = workItem.getOwner();