如何使用普通的java api查找针对类别值提交的工作项? [英] How to find work item filed against category value using plain java api?

查看:11
本文介绍了如何使用普通的java api查找针对类别值提交的工作项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用下面的代码并发现已针对类别对象归档,但在那里我无法找到该值.请帮忙.

I am using below code and found filed against category object but there I am not able to find the value. Please help.

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

推荐答案

下面的代码将有助于找出对属性值的归档:

Below code will help to find out the filed against attribute value :

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

这篇关于如何使用普通的java api查找针对类别值提交的工作项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆