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 (63.1k33646) | 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.


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.