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
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
Accepted answer
14 other answers
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.
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.
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
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
page 2of 1 pagesof 2 pages