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

Deleting a Link from a Work Item

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

0 votes



2 answers

Permanent link

Hi,

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

https://jazz.net/forum/questions/172804/rtc-is-there-any-way-to-delete-work-item-links-such-as-trace-to-in-batch

0 votes


Permanent link

As far as I can tell, you basically use com.ibm.team.workitem.common.model.IWorkItemReferences.remove(IReference) to remove the references you no longer want. See com.ibm.js.team.workitem.commandline.helper.WorkItemUpdateHelper.updateLinks(ParameterValue, List<Exception>)


in the Work Item Command Line ( https://rsjazz.wordpress.com/2017/03/29/the-work-item-command-line-is-now-open-source/ ) if you want to see more RTC Work Item API.

0 votes

Your answer

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
× 10,937

Question asked: Oct 11 '17, 6:13 p.m.

Question was seen: 2,340 times

Last updated: Oct 12 '17, 3:03 a.m.

Confirmation Cancel Confirm