It's all about the answers!

Ask a question

How to get the value of Planned for?


pugazhenthi samidurai (26423942) | asked May 24 '12, 1:17 a.m.
Hi,

i am using plain java client for fetching all work items and its values.

More over i have found the solution for fetching all attribute values.

But i am unable to get the value of Planned for attribute.


Please suggest any solution.

One answer



permanent link
pugazhenthi samidurai (26423942) | answered May 24 '12, 5:11 a.m.
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();

}

Your answer


Register or to post your answer.