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.
|
Be the first one to answer this question!
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.
Comments
Edited the question, previous question could have been misleading as I did not specified i wanted to use server API.