It's all about the answers!

Ask a question

How to add successor and predecessors using plain java?

pugazhenthi samidurai (26423742) | asked Apr 11 '12, 1:34 a.m.

I have followed the below link to create new work item using plain java client library.

Let me know how to add successor and predecessors to the work item.



One answer

permanent link
pugazhenthi samidurai (26423742) | answered Oct 03 '12, 8:07 a.m.

the below snippet of code will help you to add predecessor through plain java client .

private void setPredecessors(WorkItemWorkingCopy wc, IWorkItem parent) {
        IEndPointDescriptor referenceType = WorkItemEndPoints.PREDECESSOR_WORK_ITEMS;
        IReference reference = WorkItemLinkTypes
        wc.getReferences().add(referenceType, reference);


Pugazh S

Your answer

Register or to post your answer.