It's all about the answers!

Ask a question

Deleting a Link from a Work Item

Roanna Rague (215) | asked Oct 11 '17, 6:13 p.m.

Hello, sorry for all the questions, I am still trying to learn this API.

My question is how to delete a link from a work item. And what I mean by that, is along the lines of how to delete a parent link or child link from a work item. The problem is that we have an operational behavior that prevents a certain work item from being saved if it is not a 'Risk' or 'Issue' parent. So if the user accidently creates a link to a parent that is say a 'Meeting', then the work item cannot save, and even if you delete the 'Meeting' parent and try to create a 'Risk' or 'Issue' parent, the work item still thinks it has a 'Meeting' parent, and won't allow two parent references.

I'd like to programmatically delete a link to a parent that is not a 'Risk' or 'Issue', that way, the user can set the proper one?

I've done some research, and I believe you have to get a copy of the work item? I know IReference, and getNewReferences() and things like such will come in to play, I am just not quite sure how to go about deleting a link?

Thank you

2 answers

permanent link
Andy Chen (812) | answered Oct 12 '17, 12:18 a.m.


The link below should have information that will help you out with deleting work item links with the Plain Java Client API

permanent link
Ralph Schoon (61.4k33643) | answered Oct 12 '17, 3:03 a.m.

As far as I can tell, you basically use to remove the references you no longer want. See, List<Exception>)

in the Work Item Command Line ( ) if you want to see more RTC Work Item API.

Your answer

Register or to post your answer.