How to fetch Filed Against all values for plugin combo box?
Hi,
I have designed plugin form for create workitem. i can able to get all values of custom enumaration attributes. Let me know how to get the all values of Release, Planned For and Filed Against from My Project Area using Plain java client or plugin design. could any suggest me the solution. Thanks, Glory |
3 answers
Hi,
i have found the solution for fetching Filed Against attribute. find my code below. public static String[] getFiledAgainstList() throws TeamRepositoryException { String[] list = null; IProgressMonitor monitor = new NullProgressMonitor(); IAttribute attribute= workItemClient.findAttribute(projectArea,IWorkItem.CATEGORY_PROPERTY, monitor ); int i =0; try { ItemProfile<ICategory> profile= ICategory.DEFAULT_PROFILE.createExtension(ICategory.CATEGORY_ID); List<ICategory> enumeration = workItemClient.findCategories(projectArea, profile, monitor); list = new String; for (ICategory literal : enumeration) { list = literal.getName(); System.out.println(literal.getName()); i++; } } catch (TeamRepositoryException e) { } return list; } Thanks, Glory |
Hi,
How to get the values of Planned For and Found in attributes. Thanks, Glory |
Hi,
i have found the solution for fetching Found in (Release) Attribute. check my code below. @SuppressWarnings("unchecked") public static String[] getReleaseList() throws TeamRepositoryException { String[] list = null; System.out.println("Inside getReleaseList"); IProgressMonitor monitor = new NullProgressMonitor(); int i =0; try { ItemProfile<IDeliverable> profile= IDeliverable.DEFAULT_PROFILE; List<IDeliverable> enumeration = workItemClient.findDeliverablesByProjectArea(projectArea, true, profile, monitor); list = new String; for (IDeliverable literal : enumeration) { list = literal.getName(); // System.out.println(literal.getName()); i++; } } catch (TeamRepositoryException e) { } return list; } Thanks , Glory |
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.
Comments
Hi Glory,
Hi ,
Please check below code to get Selected value of the filed Against field.
public static String getFiledAgainst(IWorkItem workitem)
{
IItemManager itm = teamRepository.itemManager();
ICategory category = null;
try {
category = (ICategory) itm.fetchCompleteItem(workitem.getCategory(), IItemManager.DEFAULT, null);
} catch (TeamRepositoryException e) {
ErrorLog.error(e.getLocalizedMessage());
}
return category.getName();
}