How to get value for State and Priority attributes.
Hi,
I am using plain java client for fetching all work items. public static String getContributorsValue(IContributorHandle contributorval) { ITeamRepository repository = RepositoryManager.getInstance().getCurrentRepository(); IItemManager itm = repository.itemManager(); IContributor contributor = null; try { contributor = (IContributor) itm.fetchCompleteItem(contributorval, IItemManager.DEFAULT, null); } catch (TeamRepositoryException e) { // TODO Auto-generated catch block e.printStackTrace(); } return contributor.getName(); } |
Accepted answer
here is my code used on the server for finding all the values of all the attributes of a workitem..
you need to change IWorkItemCommon to IWorkItemClient. (and use the getclient for IWorkItemClient). // reference the right object type (cast) pugazhenthi samidurai selected this answer as the correct answer
|
One other answer
Hi sam,
Thank you for your response. Now i can able to retrieve priority attribute value and literal. Is there any solution. Comments
Gustavo Leyva
commented Aug 05 '12, 5:20 p.m.
Hi, Here is my code to obtain the value of Status attribute returnAttribute.status = ((IWorkItemClient)repo.getClientLibrary(IWorkItemClient.class)).findWorkflowInfo(workItem, null).getStateName(workItem.getState2()); |
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.