It's all about the answers!

Ask a question

Problem in getting Child Work Items.

radhika bandari (10675) | asked Oct 21 '11, 3:21 a.m.

My requirement is to set values to some custom attributes of child work item of a particular work item before it gets saved. I am implementing an IOperationAdvisor.
I am able to get child references, but how to get exactly child work items, so that I can set custom attribute values.

if (data instanceof ISaveParameter) {
IAuditable auditable = ((ISaveParameter) data).getNewState();
if (auditable instanceof IWorkItem) {
IWorkItem parentworkItem= (IWorkItem) auditable;

IWorkItemReferences references = service.resolveWorkItemReferences(parentworkItem, null);

List<IReference> listChildReferences = references.getReferences(WorkItemEndPoints.CHILD_WORK_ITEMS);

IReference childReference = listChildReferences.get(0);

Be the first one to answer this question!

Register or to post your answer.