It's all about the answers!

Ask a question

How Do I Remove a Work Item Link via CSV Import?


Nate Decker (37814261) | asked Jul 22 '16, 10:55 a.m.
retagged Aug 05 '16, 2:35 p.m. by Ken Tessier (84117)

I have used CSV imports in the past to successfully create links between work items (whether new or existing). I now have a user who would like to perform a CSV import to remove a link from existing work items (actually they want to change all of the "Blocks" links to "Depends On" links).

When I tried to do this for them, I was able to add the desired link, but was unable to remove the previous one. So exporting a query for the existing work items and their relationship to one another, it looks like this:

"Id","Depends On","Blocks"
"104478","#154409",""
"154409","","#104478"

We tried changing this to look like this:

"Id","Depends On","Blocks"
"104478","","#154409"
"154409","#104478",""

After this import, both work items block each other AND depend on each other. So the desired link was added, but the other link was not removed. Is this not possible via CSV import?

Accepted answer


permanent link
Lily Wang (4.9k714) | answered Jul 25 '16, 2:28 a.m.
When you import the work items from Eclipse client, have you ticked "Replace existing links with newly imported values" which is under "Update matched work item"?
Nate Decker selected this answer as the correct answer

Comments
sam detweiler commented Jul 25 '16, 7:53 a.m.

how do you replace with NO info?    or does it delete everything, and then just add the ones found in the import (no).


Nate Decker commented Jul 25 '16, 10:10 a.m.

This deserves a "duh" directed toward me. I feel like I knew about this checkbox, but for some reason forgot about it when it came up in this case. That was the problem. I checked the box and the CSV worked as desired. Thanks for jogging my memory.


sam detweiler commented Jul 25 '16, 11:16 a.m.

ok, well, I am wrong.. scary that it deletes all links before adding

One other answer



permanent link
Ken Tessier (84117) | answered Aug 05 '16, 2:37 p.m.
I've submitted Need to update Importing work items from a CSV file help topic to describe updating links (397910) to update the help to describe the "Replace existing links with newly imported values" checkbox option.

Ken

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.