Skip to content

Commit 36656e8

Browse files
committed
📝 (docs): enhance field map documentation with structured sections
Add structured sections such as "Samples" and "Metadata" to the field-calculation-map and field-clear-map documentation. Introduce class-description and class-options for better content organization. Remove unnecessary horizontal rules for cleaner formatting. These changes improve the readability and usability of the documentation by providing clear, organized sections and examples, making it easier for users to understand and implement the field maps.
1 parent 8c7070f commit 36656e8

File tree

2 files changed

+46
-14
lines changed
  • docs/content/docs/reference/field-maps

2 files changed

+46
-14
lines changed

docs/content/docs/reference/field-maps/field-calculation-map/index.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ date: 2025-06-24T12:07:31Z
1515
discussionId: 2756
1616
---
1717

18+
{{< class-description >}}
19+
20+
1821
## Purpose and Use Cases
1922

2023
This map is typically used when:
@@ -24,7 +27,6 @@ This map is typically used when:
2427
- You wish to **assign weights** to different numeric fields and store a computed score
2528
- Your source project uses **different naming or units**, and you want to normalise during migration
2629

27-
---
2830

2931
## Options
3032

@@ -47,15 +49,13 @@ The [NCalc](https://github.com/ncalc/ncalc) engine supports:
4749

4850
This multiplies the values of the two fields `Custom.EstimatedHours` and `Custom.HourlyRate`.
4951

50-
---
5152

5253
## Behaviour and Execution
5354

5455
- The field map executes during **work item migration** and **before saving** to the target.
5556
- It applies to the **latest revision** only unless otherwise configured.
5657
- The calculated value **overwrites** any existing value in `targetField`.
5758

58-
---
5959

6060
## Field Resolution Rules
6161

@@ -64,7 +64,6 @@ This multiplies the values of the two fields `Custom.EstimatedHours` and `Custom
6464
- If a referenced field is missing or null, the expression evaluation may fail.
6565
- Non-numeric fields will cause an evaluation error.
6666

67-
---
6867

6968
## Practices
7069

@@ -73,12 +72,29 @@ This multiplies the values of the two fields `Custom.EstimatedHours` and `Custom
7372
- Always **test with a sample dataset** using `run-local` before production use.
7473
- Use `ApplyTo` to limit the map to only relevant work item types.
7574

76-
---
7775

7876
## Limitations
7977

8078
- Only works with **numeric** source fields.
8179
- Errors during evaluation are **not recoverable** mid-run unless caught at validation.
8280
- Does **not support cross-work-item calculations**.
8381

84-
---
82+
83+
84+
## Samples
85+
86+
### Sample
87+
88+
{{< class-sample sample="sample" >}}
89+
90+
### Defaults
91+
92+
{{< class-sample sample="defaults" >}}
93+
94+
### Classic
95+
96+
{{< class-sample sample="classic" >}}
97+
98+
## Metadata
99+
100+
{{< class-metadata >}}

docs/content/docs/reference/field-maps/field-clear-map/index.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ aliases:
1010
- /learn/azure-devops-migration-tools/Reference/FieldMaps/FieldClearMap/index.md
1111
date: 2025-06-24T12:07:31Z
1212
discussionId: 2791
13-
1413
---
15-
The **FieldClearMap** is used to explicitly clear a field value on migrated work items by setting the target field to `null`. This is especially useful for sanitising or removing unwanted metadata, calculated fields, or legacy data that should not be carried into the target system.
1614

17-
---
15+
{{< class-description >}}
16+
17+
The **FieldClearMap** is used to explicitly clear a field value on migrated work items by setting the target field to `null`. This is especially useful for sanitising or removing unwanted metadata, calculated fields, or legacy data that should not be carried into the target system.
1818

1919
## Purpose and Use Cases
2020

@@ -24,7 +24,9 @@ This map is typically used when:
2424
- You're migrating to a system where a field is **no longer in use** or **read-only**.
2525
- A field value causes validation errors in the target and should be reset.
2626

27-
---
27+
## Options
28+
29+
{{< class-options >}}
2830

2931
## Behaviour
3032

@@ -33,7 +35,6 @@ This map is typically used when:
3335
- Only affects the latest revision unless the processor is configured to rewrite history.
3436
- Will silently **overwrite** any existing value in that field on the target.
3537

36-
---
3738

3839
## Practices
3940

@@ -42,12 +43,27 @@ This map is typically used when:
4243
- Combine with `ApplyTo` to limit field clearing to specific types where the field is present.
4344
- Be cautious when clearing **system fields**; not all fields accept `null` values.
4445

45-
---
46-
4746
## Limitations
4847

4948
- Does not validate whether the field actually exists on the target.
5049
- If `targetField` is a **required field** in the target process, this may cause a validation error.
5150
- Does not support conditional clearing; the field is always cleared if this map applies.
5251

53-
---
52+
53+
## Samples
54+
55+
### Sample
56+
57+
{{< class-sample sample="sample" >}}
58+
59+
### Defaults
60+
61+
{{< class-sample sample="defaults" >}}
62+
63+
### Classic
64+
65+
{{< class-sample sample="classic" >}}
66+
67+
## Metadata
68+
69+
{{< class-metadata >}}

0 commit comments

Comments
 (0)