-
-
Notifications
You must be signed in to change notification settings - Fork 372
Implement ExportWorkItemMappingTool #3031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
satano
wants to merge
11
commits into
nkdAgility:main
Choose a base branch
from
satano:workItemMappingTool
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+354
−19
Draft
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6964aea
Fix measuring duration of processor and command
satano 090e60d
Implement WorkItemMappingTool
satano a0dc312
Rename tool to ExportWorkItemMappingTool
satano db10352
Fix some code review issues
satano e5368bd
Handle null from deserialization
satano 05a731e
Some more fixes from code review
satano 52fcedc
Use OrdinalIgnoreCase key comparer for loaded dictionary of existing …
satano d4db81b
Fix tests
satano a3c38fc
Regenerate docs
satano 910e831
Tools are disabled by default if not enabled in config, so there is n…
satano be0df48
TfsChangeSetMappingToolOptions.ChangeSetMappingFile add missing comment
satano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
docs/data/classes/reference.tools.exportworkitemmappingtool.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| optionsClassName: ExportWorkItemMappingToolOptions | ||
| optionsClassFullName: MigrationTools.Tools.ExportWorkItemMappingToolOptions | ||
| configurationSamples: | ||
| - name: defaults | ||
| order: 2 | ||
| description: | ||
| code: There are no defaults! Check the sample for options! | ||
| sampleFor: MigrationTools.Tools.ExportWorkItemMappingToolOptions | ||
| - name: sample | ||
| order: 1 | ||
| description: | ||
| code: There is no sample, but you can check the classic below for a general feel. | ||
| sampleFor: MigrationTools.Tools.ExportWorkItemMappingToolOptions | ||
| - name: classic | ||
| order: 3 | ||
| description: | ||
| code: >- | ||
| { | ||
| "$type": "ExportWorkItemMappingToolOptions", | ||
| "Enabled": false, | ||
| "TargetFile": "", | ||
| "PreserveExisting": true | ||
| } | ||
| sampleFor: MigrationTools.Tools.ExportWorkItemMappingToolOptions | ||
| description: >- | ||
| Tool for exporting mappings of work item IDs from source to target. | ||
| Work item migration processor uses this tool to record work item ID mappings. | ||
| The mappings will be saved to file defined in options at the end of the migration. | ||
| className: ExportWorkItemMappingTool | ||
| typeName: Tools | ||
| options: | ||
| - parameterName: Enabled | ||
| type: Boolean | ||
| description: If set to `true` then the tool will run. Set to `false` and the processor will not run. | ||
| defaultValue: true | ||
| isRequired: false | ||
| dotNetType: System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e | ||
| - parameterName: PreserveExisting | ||
| type: Boolean | ||
| description: >- | ||
| Indicates whether existing mappings in the target file should be preserved when saving new mappings. | ||
| Default value is `true`. | ||
| defaultValue: true | ||
| isRequired: false | ||
| dotNetType: System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e | ||
| - parameterName: TargetFile | ||
| type: String | ||
| description: Path to file, where work item mapping will be saved. | ||
| defaultValue: String.Empty | ||
| isRequired: false | ||
| dotNetType: System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e | ||
| status: missing XML code comments | ||
| processingTarget: missing XML code comments | ||
| classFile: src/MigrationTools/Tools/ExportWorkItemMappingTool.cs | ||
| optionsClassFile: src/MigrationTools/Tools/ExportWorkItemMappingToolOptions.cs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
docs/static/schema/schema.tools.exportworkitemmappingtool.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "https://devopsmigration.io/schema/schema.tools.exportworkitemmappingtool.json", | ||
| "title": "ExportWorkItemMappingTool", | ||
| "description": "Tool for exporting mappings of work item IDs from source to target.\r\n Work item migration processor uses this tool to record work item ID mappings.\r\n The mappings will be saved to file defined in options at the end of the migration.", | ||
| "type": "object", | ||
| "properties": { | ||
| "Enabled": { | ||
| "description": "If set to `true` then the tool will run. Set to `false` and the processor will not run.", | ||
| "type": "boolean", | ||
| "default": "true" | ||
| }, | ||
| "PreserveExisting": { | ||
| "description": "Indicates whether existing mappings in the target file should be preserved when saving new mappings.\r\n Default value is `true`.", | ||
| "type": "boolean", | ||
| "default": "true" | ||
| }, | ||
satano marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "TargetFile": { | ||
| "description": "Path to file, where work item mapping will be saved.", | ||
| "type": "string", | ||
| "default": "String.Empty" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
src/MigrationTools.Clients.TfsObjectModel/Tools/TfsChangeSetMappingToolOptions.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| using System; | ||
| using MigrationTools.Enrichers; | ||
| using MigrationTools.Tools.Infrastructure; | ||
| using MigrationTools.Tools.Infrastructure; | ||
|
|
||
| namespace MigrationTools.Tools | ||
| { | ||
| public class TfsChangeSetMappingToolOptions : ToolOptions | ||
| { | ||
|
|
||
| /// <summary> | ||
| /// Path to changeset mapping file. | ||
| /// </summary> | ||
| /// <default>null</default> | ||
| public string ChangeSetMappingFile { get; set; } | ||
|
|
||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/MigrationTools.Shadows/Tools/MockExportWorkItemMappingTool.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| using MigrationTools.Tools.Interfaces; | ||
|
|
||
| namespace MigrationTools.Tools.Shadows | ||
| { | ||
| public class MockExportWorkItemMappingTool : IExportWorkItemMappingTool | ||
| { | ||
| public void AddMapping(string sourceId, string targetId) | ||
| { | ||
| } | ||
|
|
||
| public void SaveMappings() | ||
| { | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.