|
1 | | -**Visual Studio Team Services Bulk Data Editor Engine**Visual Studio Team Services Bulk Data Editor Engine allows you to bulk edit data in Microsoft Team Foundation Server (TFS) and Visual Studio Team Services (VSTS). There are two main purposes for this tooling:- **Bulk Update** - You can builk update work items and apply processing rules against your server or account. Use the `WorkItemUpdate` class that takes only a target Team Project. - **Migration** - You can migrate work items, area & iterations, & test data from one Team Project to another. Use the `WorkItemMigrationContext` calss that takes both a Source and a Target Team Project**Using the tools**In order to use these tool you can create a new application in Visual Studio and add a reference to the [Nuget Package]() that is available. If you want a simple bulk update of your code then try:```csharpMigrationEngine engine = new MigrationEngine();engine.SetTarget(new TeamProjectContext(new Uri("https://myaccount.visualstudio.com/"), "MyFirstTeamProject"));engine.SetReflectedWorkItemIdFieldName("ReflectedWorkItemId");Dictionary<string, string> stateMapping = new Dictionary<string, string>();stateMapping.Add("New", "New");stateMapping.Add("Approved", "New");stateMapping.Add("Committed", "Active");stateMapping.Add("In Progress", "Active");stateMapping.Add("To Do", "New");stateMapping.Add("Done", "Closed");engine.AddFieldMap("*", new FieldValueMap("System.State", "System.State", stateMapping));engine.AddFieldMap("*", new FieldToTagFieldMap("System.State", "ScrumState:{0}"));engine.AddFieldMap("*", new FieldToFieldMap("Microsoft.VSTS.Common.BacklogPriority", "Microsoft.VSTS.Common.StackRank"));engine.AddFieldMap("*", new FieldToFieldMap("Microsoft.VSTS.Scheduling.Effort", "Microsoft.VSTS.Scheduling.StoryPoints"));engine.AddFieldMap("*", new FieldMergeMap("System.Description", "Microsoft.VSTS.Common.AcceptanceCriteria", "System.Description", @"{0} <br/><br/><h3>Acceptance Criteria</h3>{1}"));engine.AddFieldMap("*", new FieldToFieldMap("Microsoft.VSTS.CMMI.AcceptanceCriteria", "COMPANY.DEVISION.Analysis"));engine.AddProcessor(new WorkItemUpdate(me, @" AND [System.Id]=3 "));```There are for field mapping systems available:- FieldValueMap- FieldToTagFieldMap- FieldToTagFieldMap- RegexFieldMapThere are other processors that can be used to migrate, or process, different sorts of data:- AttachementExportMigrationContext- AttachementImportMigrationContext- LinkMigrationContext- NodeStructuresMigrationContext- TestConfigurationsMigrationContext- TestPlansAndSuitsMigrationContext- TestVeriablesMigrationContext- TestRunsMigrationContext- WorkItemMigrationContext- ImportProfilePictureContext- WorkItemDeleteBeta Processors:- CreateTeamFolders- ExportProfilePictureFromADContext- ExportTeamList- FixGitCommitLinks**Contributing**If you wish to contribute then feel free to fork this repository and submit a pull request. If you would like to join the team please contact.This project is primarily managed and maintained on Visual Studio Team Services and code checked into MASTER is automatically synched between VSTS and GitHub. There is no hidden published code, but not all branches are published.If you want to sync your GitHub repository the check out [Open-source with VSTS or TFS and Github for better DevOps](https://nkdagility.com/open-source-vsts-tfs-github-better-devops/).**Terms**naked Agility Limited creates and maintains the "Visual Studio Team Services Bulk Data Editor Engine" project under its [terms of business](https://nkdagility.com/company/consulting-terms-of-business/) and allows full access to the source code for customers and the general public. |
| 1 | +# Visual Studio Team Services Bulk Data Editor Engine |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +| Location | Build | Sync | |
| 6 | +| ------------- |:-------------:|:-------------:| |
| 7 | +| VSTS |  |  | |
| 8 | +| GITHUB |  |  | |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +Visual Studio Team Services Bulk Data Editor Engine allows you to bulk edit data in Microsoft Team Foundation Server (TFS) and Visual Studio Team Services (VSTS). There are two main purposes for this tooling: |
| 13 | + |
| 14 | +- **Bulk Update** - You can builk update work items and apply processing rules against your server or account. Use the `WorkItemUpdate` class that takes only a target Team Project. |
| 15 | +- **Migration** - You can migrate work items, area & iterations, & test data from one Team Project to another. Use the `WorkItemMigrationContext` calss that takes both a Source and a Target Team Project |
| 16 | + |
| 17 | +**Using the tools** |
| 18 | + |
| 19 | +In order to use these tool you can create a new application in Visual Studio and add a reference to the [Nuget Package]() that is available. If you want a simple bulk update of your code then try: |
| 20 | + |
| 21 | +```csharp |
| 22 | +MigrationEngine engine = new MigrationEngine(); |
| 23 | +engine.SetTarget(new TeamProjectContext(new Uri("https://myaccount.visualstudio.com/"), "MyFirstTeamProject")); |
| 24 | +engine.SetReflectedWorkItemIdFieldName("ReflectedWorkItemId"); |
| 25 | +Dictionary<string, string> stateMapping = new Dictionary<string, string>(); |
| 26 | +stateMapping.Add("New", "New"); |
| 27 | +stateMapping.Add("Approved", "New"); |
| 28 | +stateMapping.Add("Committed", "Active"); |
| 29 | +stateMapping.Add("In Progress", "Active"); |
| 30 | +stateMapping.Add("To Do", "New"); |
| 31 | +stateMapping.Add("Done", "Closed"); |
| 32 | +engine.AddFieldMap("*", new FieldValueMap("System.State", "System.State", stateMapping)); |
| 33 | +engine.AddFieldMap("*", new FieldToTagFieldMap("System.State", "ScrumState:{0}")); |
| 34 | +engine.AddFieldMap("*", new FieldToFieldMap("Microsoft.VSTS.Common.BacklogPriority", "Microsoft.VSTS.Common.StackRank")); |
| 35 | +engine.AddFieldMap("*", new FieldToFieldMap("Microsoft.VSTS.Scheduling.Effort", "Microsoft.VSTS.Scheduling.StoryPoints")); |
| 36 | +engine.AddFieldMap("*", new FieldMergeMap("System.Description", "Microsoft.VSTS.Common.AcceptanceCriteria", "System.Description", @"{0} <br/><br/><h3>Acceptance Criteria</h3>{1}")); |
| 37 | +engine.AddFieldMap("*", new FieldToFieldMap("Microsoft.VSTS.CMMI.AcceptanceCriteria", "COMPANY.DEVISION.Analysis")); |
| 38 | +engine.AddProcessor(new WorkItemUpdate(me, @" AND [System.Id]=3 ")); |
| 39 | +``` |
| 40 | + |
| 41 | +There are for field mapping systems available: |
| 42 | + |
| 43 | +- FieldValueMap |
| 44 | +- FieldToTagFieldMap |
| 45 | +- FieldToTagFieldMap |
| 46 | +- RegexFieldMap |
| 47 | + |
| 48 | +There are other processors that can be used to migrate, or process, different sorts of data: |
| 49 | + |
| 50 | +- AttachementExportMigrationContext |
| 51 | +- AttachementImportMigrationContext |
| 52 | +- LinkMigrationContext |
| 53 | +- NodeStructuresMigrationContext |
| 54 | +- TestConfigurationsMigrationContext |
| 55 | +- TestPlansAndSuitsMigrationContext |
| 56 | +- TestVeriablesMigrationContext |
| 57 | +- TestRunsMigrationContext |
| 58 | +- WorkItemMigrationContext |
| 59 | +- ImportProfilePictureContext |
| 60 | +- WorkItemDelete |
| 61 | + |
| 62 | + |
| 63 | +Beta Processors: |
| 64 | + |
| 65 | +- CreateTeamFolders |
| 66 | +- ExportProfilePictureFromADContext |
| 67 | +- ExportTeamList |
| 68 | +- FixGitCommitLinks |
| 69 | + |
| 70 | +**Contributing** |
| 71 | + |
| 72 | +If you wish to contribute then feel free to fork this repository and submit a pull request. If you would like to join the team please contact. |
| 73 | + |
| 74 | +This project is primarily managed and maintained on Visual Studio Team Services and code checked into MASTER is automatically synched between VSTS and GitHub. There is no hidden published code, but not all branches are published. |
| 75 | + |
| 76 | +If you want to sync your GitHub repository the check out [Open-source with VSTS or TFS and Github for better DevOps |
| 77 | +](https://nkdagility.com/open-source-vsts-tfs-github-better-devops/). |
| 78 | + |
| 79 | +**Terms** |
| 80 | + |
| 81 | +naked Agility Limited creates and maintains the "Visual Studio Team Services Bulk Data Editor Engine" project under its [terms of business](https://nkdagility.com/company/consulting-terms-of-business/) and allows full access to the source code for customers and the general public. |
| 82 | + |
| 83 | + |
0 commit comments