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

How to convert IIterationHandle into IIteration using Java server API

 I am working on custom extension for work item(participant), I want to get value of Planned For attribute. 

    IIterationHandle plannedForHandle = workItem.getTarget();
I can get IIterationHandle using above method. But I am unable to convert IIterationHandle into IIteration.

I tried using below API, but id did not worked because I could not get ItemProfile for IIteration.
wis.getAuditableCommon().resolveAuditable(IAuditableHandle, ItemProfile<T>, IProgressMonitor) 

I found the link - https://rsjazz.wordpress.com/2012/10/05/handling-iterations-automation-for-the-planned-for-attribute/ where I found the code to get IIteration from IIterationHandle,

IFetchResult result = getTeamRepository().itemManager().fetchCompleteItemsPermissionAware(handles,
IItemManager.REFRESH, getProgressMonitor());
return (IIteration) result.getRetrievedItems().get(0);

IFetchResult is common API, but ITeamRepository, IItemManager are client API, I am unable to figure out how to convert IIterationHandle to IIteration.

0 votes

Comments

Edited the question, previous question could have been misleading as I did not specified i wanted to use server API.


Be the first one to answer this question!

Register or log in to post 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.

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
× 7,498
× 369

Question asked: Sep 07 '17, 8:20 a.m.

Question was seen: 1,778 times

Last updated: Sep 07 '17, 11:09 a.m.

Confirmation Cancel Confirm