How to resolve TFS Copy test plan error TF237165?
Asked Answered
S

2

8

In Microsoft Test Manager for TFS 2013.4 I am attempting to execute the "Clone Plan" operation and receiving an error:

Clone Plan Link

This is the full error log from Event Viewer.

The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

(mtm.exe, PID 8824, Thread 1) Exception: Microsoft.TeamFoundation.TestManagement.Client.TestManagementServerException
    Message: TF237165: Team Foundation could not update the work item because of a validation error on the server. This may happen because the work item type has been modified or destroyed, or you do not have permission to update the work item.
    Stack Trace:    at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.HandleReply(TfsClientOperation operation, TfsMessage message, Object[]& outputs)
   at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.Invoke(TfsClientOperation operation, Object[] parameters, TimeSpan timeout, Object[]& outputs)
   at Microsoft.TeamFoundation.TestManagement.Client.TestManagementWebService3.BeginCloneOperation(Int32 sourcePlanId, TestPlan destinationPlan, Int32[] sourceSuiteIds, String projectName, CloneOptions options)
   at Microsoft.TeamFoundation.TestManagement.Client.TestPlanHelper.BeginCloneOperation(Int32 sourcePlanId, ITestPlan destPlan, List`1 sourceSuiteIds, String projectName, CloneOptions options)
   at Microsoft.TeamFoundation.TestManagement.Activities.CloneOperationHelper.InvokeBeginCloneOperation(ClonePlanPart part, Int32 sourceTestPlanId, List`1 sourceTestSuiteIds, ITestPlan destinationTestPlan, CloneOptions cloneOptions)
   at Microsoft.TeamFoundation.TestManagement.Activities.CloneOperationHelper.ClonePlanComplete(Object sender, ModalMessageEventArgs modalMessageEventArgs)
   at Microsoft.TeamFoundation.TestManagement.Client.WpfControls.ActivityHostControl.OnAdornerWorkComplete(Object sender, MessageButtonEventArgs eventArgs)
    BaseExceptionMessage: TF237165: Team Foundation could not update the work item because of a validation error on the server. This may happen because the work item type has been modified or destroyed, or you do not have permission to update the work item.
    InnerException: System.Web.Services.Protocols.SoapException
    InnerException Message: TF237165: Team Foundation could not update the work item because of a validation error on the server. This may happen because the work item type has been modified or destroyed, or you do not have permission to update the work item.
    InnerException Stack Trace: 
    InnerExceptionBaseExceptionMessage: TF237165: Team Foundation could not update the work item because of a validation error on the server. This may happen because the work item type has been modified or destroyed, or you do not have permission to update the work item.


the message resource is present but the message is not found in the string/message table

I have full admin privileges to the Project Collection, so I am fairly certain it is not a permissions issue, but rather, the work item type(s) involved have "been modified or destroyed". I am not sure exactly how to track this down or what steps to take next.

Update

I did some additional diagnostics. I created a completely empty Test Plan within my TFS project (no associated Test Suites, Test Cases, work items...). I attempted to Clone Plan and still receive the same error.

Update

In the past, work items had been migrated from MSF for Agile Software Development v5.0 into the MSF for Agile Software Development 2013.4 template. Could these work items somehow be interfering with the cloning process, and what process would I take to clean these old work items if this is the problem?

Siffre answered 8/4, 2015 at 14:55 Comment(10)
It looks like the Test Case (or a linked Requirement) has been customized and the "New" state can't be saved after clone. What happens when you clone an individual Test Case from Web Access?Fulmis
Just double-checking, the "clone an individual Test Case from Web Access", does that mean the link with the tooltip "Create a copy of this work item (including links)" that is located on the toolbar when you actually open a test case in web access? if so, I have done this and it successfully creates a new Test Case work item with a new Id. All linked work items are preserved with their original work item ids.Siffre
And a requirement, bug or story or product backlog item?Fulmis
We do not have requirements linked. We are using the Agile 2013.4 process template. Linked bugs and user stories are preserved when cloning a Test Case. I only see the error when I perform the Test Plan clone action.Siffre
The fact that it was an upgrade may have something to do with it. How was the process upgraded? "Enable new features" in Web Access? Or pushing the updated template through witadmin?Fulmis
Does it work for you on a new Team Project created from 2013.4?Fulmis
The upgrade was actually an upgrade an a migration from one TFS project to another. I wrote a tool that uses the TFS API to facilitate the migration and preserve linkages. Also, the migration was within the same Project Collection, so for ExternalLinks (ie: changesets), I preserved the original ArtifactURI and just linked to the new work item. Additionally, I created links to the original work items from the newly migrated work items. The puzzling thing is that I tested with an empty test plan and it still failed. I will try your suggestion of creating a new Team Project.Siffre
Have you tried the "Clone" button on the Test Plan work item from Web Access?Fulmis
I think this could be a bug, I reproduce the case on Brian Killer's VM machine with installed update 4 for Fabrikamfiber project and if you look at the project source template it was an old project, this error will not happen with project created by new process templatesAnguine
@M.Radwan-MVP - what would your recommendation be for resolving this in my case? I have a lot of value in the history that exists with the old template (changesets, linkages, etc). We created the new project within the same project collection so that we did not have to migrate changesets, but simply link to existing ArtifactURI. Likely some WIT is out of sync, but I have no easy way to identify which, or the path to fix it. I appreciate any help. Thanks. Also, is there a better forum to continue this discussion?Siffre
A
1

I think this is a bug, I tried many workarounds but I couldn't find a way to do that, I reported it to Microsoft connect, you can vote with me for better response on the following link:

https://connect.microsoft.com/VisualStudio/feedback/details/1270249/clone-test-plan-throw-microsoft-teamfoundation-testmanagement-client-testmanagementserverexception

Anguine answered 22/4, 2015 at 19:20 Comment(1)
Much appreciated. +1 here and +1 there.Siffre
I
0

This tool may be exactly what you need: TFS 2013 Tester Power Tool - Bulk Copy Test Cases for Microsoft Test Manager

Impi answered 17/4, 2015 at 14:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.