Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
232 changes: 126 additions & 106 deletions appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,118 +192,138 @@
"FieldMappingTool": {
"Enabled": true,
"FieldMaps": [
{
"FieldMapType": "FieldMergeMap",
"ApplyTo": [ "SomeWorkItemType" ],
"sourceFields": [ "Custom.FieldA", "Custom.FieldB" ],
"targetField": "Custom.FieldC",
"formatExpression": "{0} \n {1}"
},
{
"FieldMapType": "FieldValueMap",
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "System.State",
"targetField": "System.State",
"defaultValue": "New",
"valueMapping": {
"Active": "InProgress",
"Resolved": "InProgress",
"Closed": "Done"
{
"FieldMapType": "FieldCalculationMap",
"ApplyTo": [ "Bug", "Task" ],
"expression": "[effort] * [rate]",
"parameters": {
"effort": "Custom.EstimatedHours",
"rate": "Custom.HourlyRate"
},
"targetField": "Custom.EstimatedCost"
},
{
"FieldMapType": "FieldMergeMap",
"ApplyTo": [ "SomeWorkItemType" ],
"sourceFields": [ "Custom.FieldA", "Custom.FieldB" ],
"targetField": "Custom.FieldC",
"formatExpression": "{0} \n {1}"
},
{
"FieldMapType": "FieldValueMap",
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "System.State",
"targetField": "System.State",
"defaultValue": "New",
"valueMapping": {
"Active": "InProgress",
"Resolved": "InProgress",
"Closed": "Done"
}
},
{
"FieldMapType": "FieldToFieldMap",
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "Microsoft.VSTS.Common.BacklogPriority",
"targetField": "Microsoft.VSTS.Common.StackRank",
"defaultValue": 42
}
},
{
"FieldMapType": "FieldToFieldMap",
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "Microsoft.VSTS.Common.BacklogPriority",
"targetField": "Microsoft.VSTS.Common.StackRank",
"defaultValue": 42
}
],
"FieldMapSamples": {
"FieldClearMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"targetField": "Custom.FieldC"
},
"FieldMergeMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceFields": [ "Custom.FieldA", "Custom.FieldB" ],
"targetField": "Custom.FieldC",
"formatExpression": "{0} \n {1}"
},
"FieldLiteralMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"targetField": "Custom.SomeField",
"value": "New field value"
},
"MultiValueConditionalMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
"FieldCalculationMap": {
"FieldMapType": "FieldCalculationMap",
"ApplyTo": [ "Bug", "Task" ],
"expression": "[effort] * [rate]",
"parameters": {
"effort": "Custom.EstimatedHours",
"rate": "Custom.HourlyRate"
},
"targetField": "Custom.EstimatedCost"
},
"FieldClearMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"targetField": "Custom.FieldC"
},
"FieldMergeMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceFields": [ "Custom.FieldA", "Custom.FieldB" ],
"targetField": "Custom.FieldC",
"formatExpression": "{0} \n {1}"
},
"FieldLiteralMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"targetField": "Custom.SomeField",
"value": "New field value"
},
"MultiValueConditionalMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
},
"targetFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
}
},
"targetFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
}
},
"targetFieldsAndValues": {
"ApplyTo": [ "SomeWorkItemType" ],
"targetField": "Custom.ReflectedWorkItemId"
},
"FieldValueMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "System.State",
"targetField": "System.State",
"defaultValue": "StateB",
"valueMapping": {
"StateA": "StateB"
}
},
"FieldToFieldMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "Microsoft.VSTS.Common.BacklogPriority",
"targetField": "Microsoft.VSTS.Common.StackRank",
"defaultValue": 42
},
"FieldToFieldMultiMap": {
"ApplyTo": [ "SomeWorkItemType", "SomeOtherWorkItemType" ],
"SourceToTargetMappings": {
"SourceField1": "TargetField1",
"SourceField2": "TargetField2"
"ApplyTo": [ "SomeWorkItemType" ],
"targetField": "Custom.ReflectedWorkItemId"
},
"FieldValueMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "System.State",
"targetField": "System.State",
"defaultValue": "StateB",
"valueMapping": {
"StateA": "StateB"
}
},
"FieldToFieldMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "Microsoft.VSTS.Common.BacklogPriority",
"targetField": "Microsoft.VSTS.Common.StackRank",
"defaultValue": 42
},
"FieldToFieldMultiMap": {
"ApplyTo": [ "SomeWorkItemType", "SomeOtherWorkItemType" ],
"SourceToTargetMappings": {
"SourceField1": "TargetField1",
"SourceField2": "TargetField2"
}
},
"FieldToTagMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "System.State",
"formatExpression": "ScrumState:{0}"
},
"FieldToTagFieldMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceFields": [
"System.Description",
"Microsoft.VSTS.Common.AcceptanceCriteria"
],
"targetField": "System.Description",
"formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}"
},
"RegexFieldMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "COMPANY.PRODUCT.Release",
"targetField": "COMPANY.DEVISION.MinorReleaseVersion",
"pattern": "PRODUCT \\d{4}.(\\d{1})",
"replacement": "$1"
},
"FieldValueToTagMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "Microsoft.VSTS.CMMI.Blocked",
"pattern": "Yes",
"formatExpression": "{0}"
},
"TreeToTagMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"toSkip": 3,
"timeTravel": 1
}
},
"FieldToTagMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "System.State",
"formatExpression": "ScrumState:{0}"
},
"FieldToTagFieldMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceFields": [
"System.Description",
"Microsoft.VSTS.Common.AcceptanceCriteria"
],
"targetField": "System.Description",
"formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}"
},
"RegexFieldMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "COMPANY.PRODUCT.Release",
"targetField": "COMPANY.DEVISION.MinorReleaseVersion",
"pattern": "PRODUCT \\d{4}.(\\d{1})",
"replacement": "$1"
},
"FieldValueToTagMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"sourceField": "Microsoft.VSTS.CMMI.Blocked",
"pattern": "Yes",
"formatExpression": "{0}"
},
"TreeToTagMap": {
"ApplyTo": [ "SomeWorkItemType" ],
"toSkip": 3,
"timeTravel": 1
}
}
},
"TfsChangeSetMappingTool": {
Expand Down
39 changes: 34 additions & 5 deletions docs/_data/reference.fieldmaps.fieldcalculationmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,48 @@ configurationSamples:
- name: sample
order: 1
description:
code: There is no sample, but you can check the classic below for a general feel.
code: >-
{
"MigrationTools": {
"Version": "16.0",
"CommonTools": {
"FieldMappingTool": {
"FieldMaps": [
{
"ApplyTo": [
"Bug",
"Task"
],
"expression": "[effort] * [rate]",
"FieldMapType": "FieldCalculationMap",
"parameters": {
"effort": "Custom.EstimatedHours",
"rate": "Custom.HourlyRate"
},
"targetField": "Custom.EstimatedCost"
}
]
}
}
}
}
sampleFor: MigrationTools.Tools.FieldCalculationMapOptions
- name: classic
order: 3
description:
code: >-
{
"$type": "FieldCalculationMapOptions",
"expression": null,
"parameters": {},
"targetField": null,
"expression": "[effort] * [rate]",
"parameters": {
"effort": "Custom.EstimatedHours",
"rate": "Custom.HourlyRate"
},
"targetField": "Custom.EstimatedCost",
"ApplyTo": [
"*"
"*",
"Bug",
"Task"
]
}
sampleFor: MigrationTools.Tools.FieldCalculationMapOptions
Expand Down
26 changes: 26 additions & 0 deletions docs/_data/reference.tools.fieldmappingtool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ configurationSamples:
"FieldMappingTool": {
"Enabled": "True",
"FieldMaps": [
{
"ApplyTo": [
"Bug",
"Task"
],
"expression": "[effort] * [rate]",
"FieldMapType": "FieldCalculationMap",
"parameters": {
"effort": "Custom.EstimatedHours",
"rate": "Custom.HourlyRate"
},
"targetField": "Custom.EstimatedCost"
},
{
"ApplyTo": [
"SomeWorkItemType"
Expand Down Expand Up @@ -70,6 +83,19 @@ configurationSamples:
}
],
"FieldMapSamples": {
"FieldCalculationMap": {
"ApplyTo": [
"Bug",
"Task"
],
"expression": "[effort] * [rate]",
"FieldMapType": "FieldCalculationMap",
"parameters": {
"effort": "Custom.EstimatedHours",
"rate": "Custom.HourlyRate"
},
"targetField": "Custom.EstimatedCost"
},
"FieldClearMap": {
"ApplyTo": [
"SomeWorkItemType"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,48 @@ configurationSamples:
- name: sample
order: 1
description:
code: There is no sample, but you can check the classic below for a general feel.
code: >-
{
"MigrationTools": {
"Version": "16.0",
"CommonTools": {
"FieldMappingTool": {
"FieldMaps": [
{
"ApplyTo": [
"Bug",
"Task"
],
"expression": "[effort] * [rate]",
"FieldMapType": "FieldCalculationMap",
"parameters": {
"effort": "Custom.EstimatedHours",
"rate": "Custom.HourlyRate"
},
"targetField": "Custom.EstimatedCost"
}
]
}
}
}
}
sampleFor: MigrationTools.Tools.FieldCalculationMapOptions
- name: classic
order: 3
description:
code: >-
{
"$type": "FieldCalculationMapOptions",
"expression": null,
"parameters": {},
"targetField": null,
"expression": "[effort] * [rate]",
"parameters": {
"effort": "Custom.EstimatedHours",
"rate": "Custom.HourlyRate"
},
"targetField": "Custom.EstimatedCost",
"ApplyTo": [
"*"
"*",
"Bug",
"Task"
]
}
sampleFor: MigrationTools.Tools.FieldCalculationMapOptions
Expand Down
Loading
Loading