Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Programmatically get all work item children

Hi all,
I would programmatically find all children of work item and, after, analyze the custom attribute of these.

I try in this way:
IWorkItemReferences referencesCopy = wis.resolveWorkItemReferences(wiCopy, null);	

List<IReference> links = referencesCopy.getReferences(WorkItemEndPoints.CHILD_WORK_ITEMS);
for (IReference lin : links) {
List<IAttributeHandle> childsWorkItem = ((IWorkItem)lin.getLink().getWorkingCopy()).getCustomAttributes();
for ( IAttributeHandle iah : childsWorkItem) {
IAttribute customAttribute = (IAttribute) (repositoryItemService.fetchItem(iah, null));
if (customAttribute.getIdentifier().equalsIgnoreCase("defectalreadyopened"))
{

.....

}
}
}



but I obtain this error:
java.lang.ClassCastException: com.ibm.team.links.internal.links.impl.AuditableLinkImpl incompatible with com.ibm.team.workitem.common.model.IWorkItem


Any suggestions?

Thanks
Andrea

0 votes


Be the first one to answer this question!

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,052

Question asked: Jul 28 '10, 9:15 p.m.

Question was seen: 6,739 times

Last updated: Jul 28 '10, 9:15 p.m.

Confirmation Cancel Confirm