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

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

0 votes

Comments

 Hi Glory, 


How would you find out the selected item of filed against? I need to know only the item selected rather than the whole list of items.


Thanks,
F

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();
}



3 answers

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

0 votes


Permanent link
Hi,


How to get the values of Planned For and Found in attributes.


Thanks,

Glory

0 votes


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

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,952

Question asked: Mar 30 '12, 5:35 a.m.

Question was seen: 5,149 times

Last updated: Feb 06 '13, 11:51 p.m.

Confirmation Cancel Confirm