It's all about the answers!

Ask a question

[closed] Getting Java class cast exception

lakshmi jyothsna (3710) | asked Feb 01 '17, 6:56 a.m.
closed Feb 01 '17, 7:41 a.m. by Ralph Schoon (62.7k33643)

 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

permanent link
Ralph Schoon (62.7k33643) | answered Feb 01 '17, 7:38 a.m.

 See to understand how to get the owner.

IContributorHandle owner = workItem.getOwner();