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

list all WorkItems of one Project Area

Hello,

I´m working with a Follow up that extends AbstractService and implements IOperationParticipant ...

I need to list all WorkItems of one Project Area, to get especifics values of atributes for each WI...



With this I list all attributes but not the values....

List<IWorkItemType> listaWIT=workItemServer.findWorkItemTypes(pa, monitor);
Iterator<IWorkItemType> iterW =listaWI2.iterator();
while (iterW.hasNext()){
         List<IAttributeHandle> listaAtt=iterW.next().getCustomAttributes();
         Iterator<IAttributeHandle> iterAtt=listaAtt.iterator();
                        while (iterAtt.hasNext()){
                            IAttribute  attribute= auditableServer.resolveAuditable(
                                         iterAtt.next(),
                                         ItemProfile.<IAttribute>createFullProfile(IAttribute.ITEM_TYPE),
                                         monitor);
                            //attribute.getValue() ------>I need something like that....????
                          }
}

Anyone know any solution???

thanks

1 vote


Accepted answer


14 other answers

Permanent link
I change this:

 IQueryResult<iresolvedresult<iworkitem>> results=queryClient.getResolvedExpressionResults(targetProjectArea, inProjectArea,IWorkItem.SMALL_PROFILE); ---->IWorkItem.FULL_PROFILE...

Think i have the custom attrs....

0 votes


Permanent link
If there are no custom attributes (only built in attributes) your custom attributes list returned will be empty.
Have you added a custom attribute to your work item type?
You can also try IAttribute.FULL_PROFILE for the profile.

0 votes


Permanent link
One last addition. The queries have a limit that is set server side. If you want all, you have to set the limit of the result set to the maximum first, before you do anything with it:
       results.setLimit(Integer.MAX_VALUE);

One last comment. It has already been stated, but you are impacting the UI performance heavily doing this. You should consider if there would be a way to trigger this in the participant and have some sort of background job doing the work later.

0 votes


Permanent link
Hello Ralph,

now i´m trying get the CHILD_WORK_ITEMS ...(only by AbstractService )

After searching the forum, this should run....

IWorkItemReferences ref= workItemServer.resolveWorkItemReferences((IWorkItemHandle)workItem, monitor);
List<ireference>  listChildReferences = ref.getReferences(WorkItemEndPoints.CHILD_WORK_ITEMS);     //Always listChildReferences.size()=0..???

Can you help me?

I opened another post to this question

https://jazz.net/forum/questions/83259/find-child_work_items-in-a-follow-up-extends-abstractservice-implements-ioperationparticipant

Thanks

0 votes


Permanent link
(IWorkItemHandle)workItem.getItemHandle()  in ref

0 votes

1–15 items
page 2of 1 pagesof 2 pages

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

Question asked: Jul 24 '12, 6:32 a.m.

Question was seen: 10,045 times

Last updated: Jul 30 '12, 6:30 p.m.

Confirmation Cancel Confirm