Problem in getting Child Work Items.
Hi,
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);
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);