如何使用普通的java api找到针对类别值提交的工作项?

时间:2018-03-21 06:16:13

标签: java api rtc workitem

我正在使用下面的代码并发现针对类别对象提交但在那里我无法找到该值。请帮忙。

IProjectAreaHandle projectAreaHandle = workItem.getProjectArea();

                IAttribute someAttribute = workItemClient.findAttribute(projectAreaHandle, IWorkItem.CATEGORY_PROPERTY,
                        monitor);



    IAttributeHandle iAttributeHandle = (IAttributeHandle) someAttribute;
                    IAttribute iAttribute = (IAttribute) repo
                        .itemManager().fetchCompleteItem(
                        iAttributeHandle, IItemManager.DEFAULT ,monitor);

                    Object value = workItem.getValue(iAttribute);

1 个答案:

答案 0 :(得分:1)

下面的代码将有助于找出针对属性值的字段:

 ICategoryHandle iCategoryHandle = workItem.getCategory();
                ICategory iCategory1 = (ICategory) repo
                        .itemManager().fetchCompleteItem(
                                iCategoryHandle, IItemManager.DEFAULT ,monitor);
                return iCategory1.getName();