Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes



One answer

Permanent link
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;
    }

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Mar 20 '12, 4:28 a.m.

Question was seen: 3,977 times

Last updated: Oct 03 '12, 8:17 a.m.

Confirmation Cancel Confirm