It's all about the answers!

Ask a question

Find CHILD_WORK_ITEMS in a Follow up (extends AbstractService implements IOperationParticipant)


Paulino Alonso (381214) | asked Jul 30 '12, 8:30 a.m.
edited Jul 31 '12, 11:57 a.m. by Jared Burns (4.5k29)
Hello,

I need find CHILD_WORK_ITEMS ...(only by AbstractService )

I am trying this code:

IWorkItemReferences ref= workItemServer.resolveWorkItemReferences((IWorkItemHandle)workItem, monitor);


if(ref.hasReferences(WorkItemEndPoints.CHILD_WORK_ITEMS)){


                 List<IReference>  listChildReferences = ref.getReferences(WorkItemEndPoints.CHILD_WORK_ITEMS);     //Always listChildReferences.size()=0..???
                             
   //no works                                      
                 for (IReference reference: listChildReferences){
                                  
                        //get wi child id
            //find wi by id
                 }


===========

List<IEndPointDescriptor> auxList= ref.getTypes(); //ONLY i can extract the display names....I need the wi child objects...

thanks

2 answers



permanent link
Ralph Schoon (60.7k33643) | answered Jul 31 '12, 6:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Paulino,

maybe the code here helps? http://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/

permanent link
Paulino Alonso (381214) | answered Jul 31 '12, 7:10 a.m.
Ralph,

thanks for your time!!

I think my code is the same that your link:

// get all the references
  IWorkItemReferences references = workItemServer.resolveWorkItemReferences(parentHandle, monitor);
  // narrow down to the children
  List listChildReferences = references.getReferences(WorkItemEndPoints.CHILD_WORK_ITEMS);

my dude right now is:
IWorkItemHandle itemhandle=(IWorkItemHandle)item.getItemHandle();
is this correct?

thanks

Comments
Ralph Schoon commented Jul 31 '12, 7:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I am not sure what you try, especially what the item is, but the code in the blog post actually works and provides you with work items loaded with full profile.

Your answer


Register or to post your answer.