How to get workitem type attribute field value?
Hi,
i have developed java script custom report for showing work items. Its working fine. But i want to show the work item type field (attribute) value in my report. could any one suggest me where/which snapshot/table its resides. Thanks , Pugazh |
One answer
Hi,
check the following code to get Workitem type filed id and summary. public String getWorkitemTypeFieldValue(IWorkItem workItem,String CustomStringAttributeID) { WorkItemResolverUtil resolver = new WorkItemResolverUtil(); IWorkItem Item = null ; Object obj = null; try { obj = resolver.getAttributeValue(workItem,CustomStringAttributeID); } catch (TeamRepositoryException e1) { e1.printStackTrace(); } if (obj instanceof IWorkItemHandle) { try { Item = resolver.resolveWorkItem((IWorkItemHandle) obj); } catch (TeamRepositoryException e) { e.printStackTrace(); } } String value = ""; if(Item!=null) value = Item.getId() + Item.getHTMLSummary().getPlainText(); return value; } |
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.