我正在使用下面的代码,并发现针对类别对象归档,但我无法找到该值。请帮忙。
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);
最佳答案
下面的代码将有助于找出针对属性值的归档:
ICategoryHandle iCategoryHandle = workItem.getCategory();
ICategory iCategory1 = (ICategory) repo
.itemManager().fetchCompleteItem(
iCategoryHandle, IItemManager.DEFAULT ,monitor);
return iCategory1.getName();
关于java - 如何使用纯 java api 查找针对类别值归档的工作项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49399464/