create parent/children relationship
One answer
say that in my code, I create a bunch of atomic Wotk Items and I want to
group them under the same parent Work Item that I create on that purpose.
I did not see how to set this parent-child relationship. what is the
code to write to do so?
Please take a look at IWorkItemReferences, WorkItemLinkTypes and
WorkItemEndPoints. A rough sketch of the code that you need would be:
private void setParent(WorkItemWorkingCopy wc, IWorkItem parent) {
IEndPointDescriptor referenceType= WorkItemEndPoints.PARENT_WORK_ITEM;
IReference reference= WorkItemLinkTypes.createWorkItemReference(parent);
wc.getReferences().add(referenceType, reference);
}
HTH,
Patrick
Jazz Work Item Team