How to get the value of Planned for?
One answer
Hi,
I have found the solution.
check my code below.
public static String getPlannedForValue(IWorkItem workitem)
{
ITeamRepository repository = RepositoryManager.getInstance().getCurrentRepository();
IItemManager itm = repository.itemManager();
IIteration contributor = null;
try {
contributor = (IIteration) itm.fetchCompleteItem(workitem.getTarget(), IItemManager.DEFAULT, null);
} catch (TeamRepositoryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return contributor.getName();
}
I have found the solution.
check my code below.
public static String getPlannedForValue(IWorkItem workitem)
{
ITeamRepository repository = RepositoryManager.getInstance().getCurrentRepository();
IItemManager itm = repository.itemManager();
IIteration contributor = null;
try {
contributor = (IIteration) itm.fetchCompleteItem(workitem.getTarget(), IItemManager.DEFAULT, null);
} catch (TeamRepositoryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return contributor.getName();
}