2

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

Ignacio Soler Garcia
  • 21,122
  • 31
  • 128
  • 207
  • How did you delete the work items? Seems the related work item was not deleted permanently. – Andy Li-MSFT Apr 26 '18 at 02:09
  • It is not deleted permanently because we don't want to empty the recycle bin yet until we have confirmed that no one complains about the changes in a month or so. Do you think it is needed to empty it to be able to delete other items? – Ignacio Soler Garcia Apr 26 '18 at 06:42
  • Are you sure that the workitems are deleted? Is it possible that they still exist in the project but you don't have permission to read them? – Eddie Chen - MSFT May 03 '18 at 01:54
  • @EddieChen-MSFT: that's what happened. I've opened a new bug to the VSTS team https://developercommunity.visualstudio.com/content/problem/244033/unable-to-modify-a-workitem-with-links-to-workitem.html – Ignacio Soler Garcia May 03 '18 at 11:04

3 Answers3

2

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:

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • Thanks for the info. I'm the project admin so I guess this is not a permission problem. I've deleted the WorkItems but I don't want to empty the recycle bin yet. Do you mean that I can not delete an item linked to an item which is in turn in the recycle bin? – Ignacio Soler Garcia Apr 26 '18 at 06:40
  • @IgnacioSolerGarcia No, actually I can delete the work items without any issue on my side. I just try to debug the issue in your scenario based on the error message. So, how did you delete the work items? Can you see the deleted work item `53559` in Recycle Bin? – Andy Li-MSFT Apr 27 '18 at 05:55
  • @IgnacioSolerGarcia 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. – Andy Li-MSFT Apr 27 '18 at 06:03
  • actually they are not in the recycle bin ... weird. I've copied this question on visualstudio.com too. All I did was to delete elements with the Delete menu, nothing done with the Recycle bin for sure. – Ignacio Soler Garcia Apr 27 '18 at 06:48
  • @IgnacioSolerGarcia So, in this case you can try deleting the work item `53559` permanently with the witadmin command or REST API. Then check it again. – Andy Li-MSFT Apr 27 '18 at 07:43
  • No luck :\ Are you sure you want to destroy work item(s) 53559? This action is not recoverable. (Yes/No) Yes Unable to destroy work item(s) 53559. TF237090: Does not exist or access is denied. – Ignacio Soler Garcia Apr 27 '18 at 08:56
  • Actually everything looks like if the workitem is not anymore on the system but on the link of the other workitem so a) the item was completely deleted instead of going to the bin and b) the item was not removed from the list of links of the parent. – Ignacio Soler Garcia Apr 27 '18 at 08:58
  • By the way, this is happening in quite a few workitems, not just one. – Ignacio Soler Garcia Apr 27 '18 at 08:58
  • @IgnacioSolerGarcia What about a new project? Just try to create a new project and create and delete work items to check if they have the same issue? Seems related to the database. Besides, have you ever changed the Time zone for your account after deleting the work items? See this similar thread: https://social.msdn.microsoft.com/Forums/vstudio/en-US/a8910b4f-0248-44de-8edb-3d97823239e9/why-this-error-can-be-occured-tf237090-does-not-exist-or-access-is-denied-?forum=tfsgeneral – Andy Li-MSFT Apr 27 '18 at 09:51
  • 1
    No, this issue does not happen if I do the same steps even in my own project. Have in mind that I've deleted thousand of items and this happened only in tens of these. No changes on the my account but this is a company project so I will check if that happened (anyway I can't find a reason for such change). – Ignacio Soler Garcia Apr 27 '18 at 10:04
1

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

Ignacio Soler Garcia
  • 21,122
  • 31
  • 128
  • 207
0

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.

Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197