Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

[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,.

0 votes


The question has been closed for the following reason: "Duplicate Question" by rschoon Feb 01 '17, 7:41 a.m.


One answer

Permanent link

 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();
    

0 votes

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Feb 01 '17, 6:56 a.m.

Question was seen: 915 times

Last updated: Feb 01 '17, 7:41 a.m.

Confirmation Cancel Confirm