gpt4 book ai didi

java - 从团队区域获取所有工作项

转载 作者:行者123 更新时间:2023-11-30 06:54:42 24 4
gpt4 key购买 nike

我有以下对象:

ITeamRepository repo;
IProjectArea projArea;
ITeamArea teamArea;

获取projAreateamArea的过程非常简单(尽管涉及的对象数量很多)。但是,我似乎无法找到一种方法来直接获取包含与这些对象关联的所有工作项的列表。这是否可以直接通过 IQueryClient 对象实现?

最佳答案

这个2012 thread (所以它可能已经改变)建议:

I used the following code to get the work items associated with each project area:

auditableClient = (IAuditableClient) repository.getClientLibrary(IAuditableClient.class);

IQueryClient queryClient = (IQueryClient) repository.getClientLibrary(IQueryClient.class);



IQueryableAttribute attribute = QueryableAttributes.getFactory(IWorkItem.ITEM_TYPE).findAttribute(currProject, IWorkItem.PROJECT_AREA_PROPERTY, auditableClient, null);

Expression expression = new AttributeExpression(attribute, AttributeOperation.EQUALS, currProject);

IQueryResult<IResolvedResult<IWorkItem>> results = queryClient.getResolvedExpressionResults(currProject, expression, IWorkItem.FULL_PROFILE);

In my code, currProject would be the IProjectArea pointer to the current project as you loop through the List of project areas p in your code.

The IQueryResult object 'results' then contains a list of IResolvedResult records with all of the work items for that project you can iterate through and find properties for each work item.

关于java - 从团队区域获取所有工作项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42078102/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com