It's all about the answers!

Ask a question

How to convert IIterationHandle into IIteration using Java server API


vikrant kamble (1323196) | asked Sep 07 '17, 8:20 a.m.
edited Sep 07 '17, 11:08 a.m.

 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.


Comments
vikrant kamble commented Sep 07 '17, 11:09 a.m.

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