How to get the value of the Planned for attribute for a given workitem using RTC API.
Hello All,
I want to get the value of the planned for the given workitem.
Currently i have the following logic :
iattribute = workItemClient.findAttribute(currentWorkItem.getProjectArea(), attributeId, monitor);
if (workitem.hasAttribute(iattribute)) {
Object value = workitem.getValue(iattribute);
System.out.println((null==value)?"no value":value.toString());
}
I am getting the IIterationHandles for this in the value.
How to get the value, such as Unassigned, or the iteration value set to the workitem ?
Please assist.
Thanks.
Accepted answer
Comments
Thanks for the reply Ralph.
I got the value using :
IIterationHandle iterHandle= workitem.getTarget();
IIteration iteration = (IIteration) teamRepository.itemManager()
.fetchCompleteItem((IIterationHandle) iterHandle,
IItemManager.DEFAULT, monitor);
System.out.println("iteration :" + iteration.getName());