azure-devops-migration-tools icon indicating copy to clipboard operation
azure-devops-migration-tools copied to clipboard

TestPlansAndSuitesMigrationConfig processor broken (or maybe the MS API) - "Active" State

Open stevns opened this issue 2 years ago • 6 comments

Hello All,

I'm trying to migrated test plans and suites (test cases already migrated), but I keep getting the blasted "Active" state error again. I've done this before but now something seems amiss or broken.

The "***" are obfuscation from my side :-)

Running version 11.11, 12.04 and 12.05. Same error.

Any help would be praised and highly valued.

The Config (relevant bits): ` { "$type": "FieldValueMapConfig", "WorkItemTypeName": "", "sourceField": "System.State", "targetField": "System.State", "defaultValue": "In Progress", "valueMapping": { //"Approved": "New", //"New": "Active", //"Committed": "Active", //"In Progress": "Active", "To Do": "New", "Done": "Closed", "Removed": "Removed", //"Active": "Ready" } }, { "$type": "TestPlansAndSuitesMigrationConfig", "Enabled": true, "PrefixProjectToNodes": false, "OnlyElementsWithTag": null, "TestPlanQueryBit": "", "RemoveAllLinks": false, "MigrationDelay": 0, "UseCommonNodeStructureEnricherConfig": false, "NodeBasePaths": ["**"], "AreaMaps": null, "IterationMaps": null, "RemoveInvalidTestSuiteLinks": false, "FilterCompleted": false },

`

The Log: 2022-09-16 11:28:45.268 +02:00 [INF] TestPlandsAndSuitesMigrationContext: Plan to copy 18 Plans? 2022-09-16 11:28:45.444 +02:00 [INF] =============================================================================================== 2022-09-16 11:28:45.517 +02:00 [INF] =============================================================================================== 2022-09-16 11:28:45.518 +02:00 [INF] =============================================================================================== 2022-09-16 11:28:45.518 +02:00 [INF] == Suite Name: _Stories_Iteration 1 ============================= 2022-09-16 11:28:45.519 +02:00 [INF] == Date: 7/12/2021 ============================= 2022-09-16 11:28:45.783 +02:00 [INF] == Suites: 4 ============================= 2022-09-16 11:28:45.881 +02:00 [INF] =============================================================================================== 2022-09-16 11:28:45.881 +02:00 [INF] =============================================================================================== 2022-09-16 11:28:45.881 +02:00 [INF] =============================================================================================== 2022-09-16 11:28:45.883 +02:00 [INF] == Plan[ 1/18] Suite[0/0] Cases[0/0] - planid[59005 ] | Process Plan Stories_Iteration 1 2022-09-16 11:28:45.883 +02:00 [INF] =============================================================================================== 2022-09-16 11:28:46.396 +02:00 [INF] == Plan[ 1/18] Suite[0/0] Cases[0/0] - planid[59005 ] | Found Plan Stories_Iteration 1 2022-09-16 11:28:46.869 +02:00 [INF] == Plan[ 1/18] Suite[0/4] Cases[0/0] - planid[59005 ] | Source Plan has 4 Suites 2022-09-16 11:28:46.869 +02:00 [INF] =============================================================================================== 2022-09-16 11:28:46.869 +02:00 [INF] == Suite Title: 58125 : [CR] - CHG0040373 Please remove EPR types Net-Net and Bulk pricing from EPR settings page============================= 2022-09-16 11:28:46.869 +02:00 [INF] =============================================================================================== 2022-09-16 11:28:46.869 +02:00 [INF] == Plan[ 1/18] Suite[1/4] Cases[0/0] - suiteid[59018 ] | 2022-09-16 11:28:46.869 +02:00 [INF] =============================================================================================== 2022-09-16 11:28:47.035 +02:00 [INF] == Plan[ 1/18] Suite[1/4] Cases[0/0] - suiteid[59018 ] | Processing RequirementTestSuite : 59018 - 58125 : [CR] - CHG0040373 Please remove EPR types Net-Net and Bulk pricing from EPR settings page 2022-09-16 11:28:47.533 +02:00 [DBG] WorkItemQuery: ===========GetWorkItems============= 2022-09-16 11:28:47.545 +02:00 [DBG] WorkItemQuery: TeamProjectCollection: https://dev.azure.com/gn-global-it/ 2022-09-16 11:28:47.545 +02:00 [DBG] WorkItemQuery: Query: SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject]='migtest' AND [Custom.ReflectedWorkItemId] = 'https://dev.azure.com/***/_workitems/edit/58125' 2022-09-16 11:28:47.546 +02:00 [DBG] WorkItemQuery: Parameters: {"idToFind":"https://dev.azure.com/***/_workitems/edit/58125","TeamProject":"migtest"} 2022-09-16 11:28:47.548 +02:00 [DBG] WorkItemQuery: idToFind: https://dev.azure.com/***/_workitems/edit/58125 2022-09-16 11:28:47.548 +02:00 [DBG] WorkItemQuery: TeamProject: migtest 2022-09-16 11:28:47.552 +02:00 [DBG] Query sent 2022-09-16 11:28:47.725 +02:00 [INF] 1 Work items received, verifying 2022-09-16 11:28:47.852 +02:00 [INF] Loading 1 Work Items 2022-09-16 11:28:50.243 +02:00 [DBG] 1 Work Items loaded 2022-09-16 11:28:50.248 +02:00 [DBG] GetReflectedWorkItemId: START 2022-09-16 11:28:50.248 +02:00 [DBG] GetReflectedWorkItemId: END - Has ReflectedWorkItemIdField and has value 2022-09-16 11:28:50.268 +02:00 [INF] == Plan[ 1/18] Suite[1/4] Cases[0/0] - suiteid[0 ] | Saving RequirementTestSuite : 0 - 58125 : [CR] - CHG0040373 Please remove EPR types Net-Net and Bulk pricing from EPR settings page 2022-09-16 11:28:51.199 +02:00 [ERR] FAILED RequirementTestSuite : 0 - 58125 : [CR] - CHG0040373 Please remove EPR types Net-Net and Bulk pricing from EPR settings page Microsoft.TeamFoundation.TestManagement.Client.TestManagementServerException: The field 'State' contains the value 'Active' that is not in the list of supported values ---> System.Web.Services.Protocols.SoapException: The field 'State' contains the value 'Active' that is not in the list of supported values --- End of inner exception 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.TestManagementWebService4.AddSuiteToSuite(IdAndRev parent, ServerTestSuite suite, String teamProjectName, UpdatedProperties& newSuiteProperties, Int32 toIndex) at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteHelper.<>c__DisplayClass26_0.<ServerAddSuiteToSuite>b__0() at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteHelper.TrySuiteOperationWithRefreshAndRetry(Action operation, TestSuite& source, TestSuite& destination) at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteHelper.ServerAddSuiteToSuite(TestSuite parent, TestSuite child, Int32 toIndex) at Microsoft.TeamFoundation.TestManagement.Client.TestSuite.InsertSuiteEntry(Int32 newIndex, TestSuiteEntry entry) at Microsoft.TeamFoundation.TestManagement.Client.GenericCollection2.Add(TInterface item) at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteEntryCollection.Add(ITestSuiteBase suite) at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.SaveNewTestSuiteToPlan(ITestPlan testPlan, IStaticTestSuite parent, ITestSuiteBase newTestSuite) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 1048 2022-09-16 11:28:51.808 +02:00 [FTL] Error while running TestPlansAndSuitesMigrationContext Microsoft.TeamFoundation.TestManagement.Client.TestManagementServerException: The field 'State' contains the value 'Active' that is not in the list of supported values ---> System.Web.Services.Protocols.SoapException: The field 'State' contains the value 'Active' that is not in the list of supported values --- End of inner exception 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.TestManagementWebService4.AddSuiteToSuite(IdAndRev parent, ServerTestSuite suite, String teamProjectName, UpdatedProperties& newSuiteProperties, Int32 toIndex) at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteHelper.<>c__DisplayClass26_0.<ServerAddSuiteToSuite>b__0() at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteHelper.TrySuiteOperationWithRefreshAndRetry(Action operation, TestSuite& source, TestSuite& destination) at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteHelper.ServerAddSuiteToSuite(TestSuite parent, TestSuite child, Int32 toIndex) at Microsoft.TeamFoundation.TestManagement.Client.TestSuite.InsertSuiteEntry(Int32 newIndex, TestSuiteEntry entry) at Microsoft.TeamFoundation.TestManagement.Client.GenericCollection2.Add(TInterface item) at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteEntryCollection.Add(ITestSuiteBase suite) at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.SaveNewTestSuiteToPlan(ITestPlan testPlan, IStaticTestSuite parent, ITestSuiteBase newTestSuite) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 1067 at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.ProcessTestSuite(ITestSuiteBase sourceSuite, ITestSuiteBase targetParent, ITestPlan targetPlan) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 957 at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.ProcessTestPlan(ITestPlan sourcePlan) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 847 at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 117 at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\1\s\src\MigrationTools\_EngineV1\Processors\MigrationProcessorBase.cs:line 47 2022-09-16 11:28:51.813 +02:00 [ERR] TestPlansAndSuitesMigrationContext The Processor MigrationEngine entered the failed state...stopping run

stevns avatar Sep 16 '22 09:09 stevns

I am not sure if it is related, but I was getting "half" testplans, only the id and nothing else. So I made this change and pushed it out now, I also did a successful migration from Service to Service last night, with that code change https://github.com/nkdAgility/azure-devops-migration-tools/pull/1264

ovebastiansen avatar Sep 16 '22 12:09 ovebastiansen

@ovebastiansen: brilliant. Will test when the next release is cut by @MrHinsh :-)

stevns avatar Sep 16 '22 14:09 stevns

the change is live already

ovebastiansen avatar Sep 16 '22 18:09 ovebastiansen

@ovebastiansen , updated, still broken :(

Log: [06:39:39 ERR] FAILED RequirementTestSuite : 0 - 58125 : [CR] - CHG0040373 Please remove EPR types Net-Net and Bulk pricing from EPR settings page Microsoft.TeamFoundation.TestManagement.Client.TestManagementServerException: The field 'State' contains the value 'Active' that is not in the list of supported values ---> System.Web.Services.Protocols.SoapException: The field 'State' contains the value 'Active' that is not in the list of supported values

Settings: { "$type": "FieldValueMapConfig", "WorkItemTypeName": "", "sourceField": "System.State", "targetField": "System.State", "defaultValue": "In Progress", "valueMapping": { //"Approved": "New", //"New": "Active", //"Committed": "Active", //"In Progress": "Active", "To Do": "New", "Done": "Closed", "Removed": "Removed", //"Active": "Ready" } }, { "$type": "FieldtoFieldMapConfig", "WorkItemTypeName": "", "sourceField": "System.State", "targetField": "System.State", "defaultValue": "In Progress" },

stevns avatar Sep 17 '22 04:09 stevns

You have commented out the last mapping of Active to Ready, is that the problem?

ovebastiansen avatar Sep 17 '22 11:09 ovebastiansen

@ovebastiansen, still not working. :-(

Not being a developer, savey in PostMan, what is call that is made to get the test case?

My info. Conf: { "$type": "FieldValueMapConfig", "WorkItemTypeName": "*", "sourceField": "System.State", "targetField": "System.State", "defaultValue": "In Progress", "valueMapping": { //"Approved": "New", //"New": "Active", //"Committed": "Active", //"In Progress": "Active", "To Do": "New", "Done": "Closed", "Removed": "Removed", "Active": "In Progress" }

Error:

[10:29:13 INF] == Plan[ 1/18] Suite[1/4] Cases[0/0] - suiteid[0 ] | Saving RequirementTestSuite : 0 - 58125 : [CR] - CHG0040373 Please remove EPR types Net-Net and Bulk pricing from EPR settings page [10:29:14 ERR] FAILED RequirementTestSuite : 0 - 58125 : [CR] - CHG0040373 Please remove EPR types Net-Net and Bulk pricing from EPR settings page Microsoft.TeamFoundation.TestManagement.Client.TestManagementServerException: The field 'State' contains the value 'Active' that is not in the list of supported values ---> System.Web.Services.Protocols.SoapException: The field 'State' contains the value 'Active' that is not in the list of supported values --- End of inner exception 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.TestManagementWebService4.AddSuiteToSuite(IdAndRev parent, ServerTestSuite suite, String teamProjectName, UpdatedProperties& newSuiteProperties, Int32 toIndex) at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteHelper.<>c__DisplayClass26_0.<ServerAddSuiteToSuite>b__0() at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteHelper.TrySuiteOperationWithRefreshAndRetry(Action operation, TestSuite& source, TestSuite& destination) at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteHelper.ServerAddSuiteToSuite(TestSuite parent, TestSuite child, Int32 toIndex) at Microsoft.TeamFoundation.TestManagement.Client.TestSuite.InsertSuiteEntry(Int32 newIndex, TestSuiteEntry entry) at Microsoft.TeamFoundation.TestManagement.Client.GenericCollection2.Add(TInterface item) at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteEntryCollection.Add(ITestSuiteBase suite) at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.SaveNewTestSuiteToPlan(ITestPlan testPlan, IStaticTestSuite parent, ITestSuiteBase newTestSuite) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 1046 [10:29:15 FTL] Error while running TestPlansAndSuitesMigrationContext Microsoft.TeamFoundation.TestManagement.Client.TestManagementServerException: The field 'State' contains the value 'Active' that is not in the list of supported values ---> System.Web.Services.Protocols.SoapException: The field 'State' contains the value 'Active' that is not in the list of supported values --- End of inner exception 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.TestManagementWebService4.AddSuiteToSuite(IdAndRev parent, ServerTestSuite suite, String teamProjectName, UpdatedProperties& newSuiteProperties, Int32 toIndex) at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteHelper.<>c__DisplayClass26_0.<ServerAddSuiteToSuite>b__0() at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteHelper.TrySuiteOperationWithRefreshAndRetry(Action operation, TestSuite& source, TestSuite& destination) at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteHelper.ServerAddSuiteToSuite(TestSuite parent, TestSuite child, Int32 toIndex) at Microsoft.TeamFoundation.TestManagement.Client.TestSuite.InsertSuiteEntry(Int32 newIndex, TestSuiteEntry entry) at Microsoft.TeamFoundation.TestManagement.Client.GenericCollection2.Add(TInterface item) at Microsoft.TeamFoundation.TestManagement.Client.TestSuiteEntryCollection.Add(ITestSuiteBase suite) at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.SaveNewTestSuiteToPlan(ITestPlan testPlan, IStaticTestSuite parent, ITestSuiteBase newTestSuite) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 1065 at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.ProcessTestSuite(ITestSuiteBase sourceSuite, ITestSuiteBase targetParent, ITestPlan targetPlan) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 955 at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.ProcessTestPlan(ITestPlan sourcePlan) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 845 at VstsSyncMigrator.Engine.TestPlandsAndSuitesMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 117 at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\1\s\src\MigrationTools\_EngineV1\Processors\MigrationProcessorBase.cs:line 47

stevns avatar Sep 20 '22 08:09 stevns

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days

github-actions[bot] avatar Oct 21 '22 00:10 github-actions[bot]

@stevns Did you find a solution to this problem? I am seeing the same error when migration from ADO On-Prem to ADO Services. The templates are both Agile and all the allowed states for test case, test plan, and test suite are the same on both the source and target instances.

chz160 avatar Jul 20 '23 21:07 chz160