It's all about the answers!

Ask a question

RTC: Is there any way to delete work item links (such as trace to) in batch?


1
1
Clement Liu (1.5k54249) | asked Jan 29 '15, 9:53 a.m.
We have a bunch of work items with linkage. We like to delete every linkage on the work items in batch. Is there any way to accomplish this? Our RTC version is 4.0.6. 

Thank you!

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Jan 29 '15, 10:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Clement, you could use the plain Java API to do that. As far as I know there is nothing out there that supports this out of the box. You would write something based on e.g. https://rsjazz.wordpress.com/2013/11/06/creating-clm-links-with-back-link/ (the client part) and instead of

workingCopy.getReferences().add(....
you would use

workingCopy.getReferences().remove(....
and also

getWorkingCopy().getAdditionalSaveParameters().add(
                    IAdditionalSaveParameters.UPDATE_BACKLINKS);

I am working on a second version of https://rsjazz.wordpress.com/2015/01/12/a-rtc-workitem-command-line/ that will be able to remove links, but it will take some weeks to get it published.




Clement Liu selected this answer as the correct answer

Comments
Ralph Schoon commented Jan 29 '15, 10:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

PS: the UPDATE_BACKLINKS is needed for CLM links e.g. to RQM, Doors Next as well as tracks relationships.

Also see https://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/  - at the end there is a loop that analyzes all links. You can basically use the process - get all references, then iterate all of them and remove them - or only certain endpoint types.


Clement Liu commented Jan 30 '15, 12:08 p.m.

Hi Ralph, got it. Thank you!


Your answer


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