Skip to content

Commit 82cad58

Browse files
committed
Enhance documentation for Field Mapping Tool with detailed descriptions, usage instructions, and best practices for field mappings and configurations.
1 parent ed92b05 commit 82cad58

File tree

1 file changed

+101
-1
lines changed
  • docs/content/docs/reference/tools/fieldmappingtool

1 file changed

+101
-1
lines changed

docs/content/docs/reference/tools/fieldmappingtool/index.md

Lines changed: 101 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
title: Field Mapping Tool
3-
description: Tool for applying field mapping transformations to work items during migration, supporting various field mapping strategies like direct mapping, regex transformations, and value lookups.
3+
description: The Field Mapping Tool applies field transformation strategies during work item migration, enabling sophisticated field mappings, value transformations, and data manipulations between source and target systems.
44
dataFile: reference.tools.fieldmappingtool.yaml
5+
schemaFile: schema.tools.fieldmappingtool.json
56
slug: field-mapping-tool
67
aliases:
78
- /docs/Reference/Tools/FieldMappingTool
@@ -12,6 +13,105 @@ date: 2025-06-24T12:07:31Z
1213
discussionId: 2811
1314
---
1415

16+
## Overview
17+
18+
The Field Mapping Tool is a core component of the Azure DevOps Migration Tools that enables sophisticated field transformations during work item migration. It applies configured field mappings to work items as they are processed, allowing you to transform data, map fields between different schemas, and manipulate values to match your target system requirements.
19+
20+
The tool supports a wide variety of field mapping strategies through its extensible field map system, from simple field-to-field mappings to complex calculations and regex transformations.
21+
22+
## How It Works
23+
24+
The Field Mapping Tool operates during work item processing in migration processors. When a work item is being migrated:
25+
26+
1. **Initialization**: The tool loads all configured field maps during startup, organizing them by work item type
27+
2. **Application**: During migration, the tool applies field maps in two phases:
28+
- **Universal mappings**: Maps configured with `ApplyTo: ["*"]` are applied to all work items
29+
- **Type-specific mappings**: Maps configured for the specific work item type are applied
30+
31+
3. **Processing**: Each field map executes its transformation logic on the source and target work item data
32+
33+
The tool is automatically invoked by migration processors including:
34+
35+
- **TfsWorkItemMigrationProcessor**: Applies field mappings during standard work item migration
36+
- **TfsWorkItemOverwriteProcessor**: Applies field mappings when overwriting existing work items
37+
38+
## Field Map Types
39+
40+
The Field Mapping Tool supports numerous field map types, each designed for specific transformation scenarios. All available field maps are documented in the [Field Maps section]({{< ref "docs/reference/field-maps" >}}).
41+
42+
Key categories include:
43+
44+
- **Direct Mapping**: Simple field-to-field copying and transformations
45+
- **Value Mapping**: Converting values using lookup tables and conditional logic
46+
- **Calculations**: Mathematical operations and computed field values
47+
- **Text Processing**: Regex transformations, merging, and text manipulations
48+
- **Metadata Handling**: Working with tags, areas, iterations, and other metadata
49+
- **Conditional Logic**: Applying mappings based on specific conditions
50+
51+
## Configuration Structure
52+
53+
Field mappings are configured in the `FieldMaps` array within the `FieldMappingTool` section. Each field map includes:
54+
55+
- **FieldMapType**: Specifies which field map implementation to use
56+
- **ApplyTo**: Array of work item types the mapping applies to (use `["*"]` for all types)
57+
- **Additional Properties**: Configuration specific to each field map type
58+
59+
### Common Configuration Pattern
60+
61+
```json
62+
{
63+
"FieldMappingTool": {
64+
"Enabled": true,
65+
"FieldMaps": [
66+
{
67+
"FieldMapType": "FieldToFieldMap",
68+
"ApplyTo": ["Bug", "Task"],
69+
"sourceField": "Source.Field",
70+
"targetField": "Target.Field"
71+
}
72+
]
73+
}
74+
}
75+
```
76+
77+
### Field Map Defaults
78+
79+
The `FieldMapDefaults` section allows you to set default `ApplyTo` values that will be inherited by field maps that don't specify their own `ApplyTo` configuration:
80+
81+
```json
82+
{
83+
"FieldMappingTool": {
84+
"Enabled": true,
85+
"FieldMapDefaults": {
86+
"ApplyTo": ["Bug", "Task", "User Story"]
87+
},
88+
"FieldMaps": [
89+
// Field maps without ApplyTo will inherit the defaults above
90+
]
91+
}
92+
}
93+
```
94+
95+
## Best Practices
96+
97+
### Order Matters
98+
99+
Field maps are processed in the order they appear in the configuration. Consider dependencies between mappings when ordering them.
100+
101+
### Work Item Type Targeting
102+
103+
Use specific work item types in `ApplyTo` rather than `["*"]` when possible to avoid unintended side effects.
104+
105+
### Testing Field Maps
106+
107+
Test field mappings with a small subset of work items before running full migrations to ensure they produce expected results.
108+
109+
### Performance Considerations
110+
111+
- Complex regex patterns and calculations can impact migration performance
112+
- Consider the frequency of execution when designing field mappings
113+
- Use specific work item type targeting to reduce unnecessary processing
114+
15115
{{< class-description >}}
16116

17117
## Options

0 commit comments

Comments
 (0)