Cannot delete / modify some workitems after deleting some others in VSTS

5.6k Views Asked by At

We have been deleted some stuff from one VSTS project due to some internal reorganization. After doing it we found that some workitems cannot be modified / deleted anymore, if we try to delete them we get a:

Failed to delete work item: 47420. Error Details: TF401232: Work item 53559 does not exist, or you do not have permissions to read it.

47420 is the WorkItem that I have tried to delete, 53559 is a deleted workitem that was a child of this one.

If I open the WorkItem 47420 I see under Related Work the error: Work item not found or no permission to access it.

If I delete the link and save the change I get again:

TF401232: Work item 53559 does not exist, or you do not have permissions to read it.

Any ideas? This is happening with quite a few elements ...

3

There are 3 best solutions below

0
Ignacio Soler Garcia On BEST ANSWER

The point is that the workitem showing the error is a workitem in a different project which I don't have access to. I've filled a bug about that:

https://developercommunity.visualstudio.com/content/problem/244033/unable-to-modify-a-workitem-with-links-to-workitem.html

10
Andy Li-MSFT On

Make sure you have the correct permission to delete the work items. See granted explicit permissions to delete or restore work items. Then you can try to permanently delete the work item 53559 first.

Follow below ways to permanently delete work items:

  • From web portal:

    1. Go to Work page
    2. Right click a work item > Delete
    3. Click Recycle Bin button

    enter image description here

    1. Right click a work item > permanently delete

    More information, you can refer to: Delete work items

  • Delete work items via witadmin destroywi command:

    witadmin destroywi /collection: https://xxx.visualstudio.com /id:53559

  • Delete work items with REST API:

    DELETE https://{accountName}.visualstudio.com/{project}/_apis/wit/workitems/{id}?destroy={destroy}&api-version=4.1

    Refer to Work Items - Delete for details.


UPDATE:

You mentioned "If I delete the link and save the change I get again:"

Generally when you delete a work item, the link with other work items will be also removed automatically. So I guess you did not delete the work item correctly. If you can find the deleted work item 53559 in Recycle Bin, then just try to Restore it, then try editing/deleting other work items to check if that works.

If that still not work, then you can have a try with permanently delete.

BTW, this issue seems related to specific account, there were similar issues submitted before, you can refer to below threads for more information:

0
Vivek Nuna On

This error also occurs when the user story has some of the mandatory fields not filled. So I provided the required field and I could able to solve the issue.