bps.json
This JSON file holds an array of objects with each object representing a mapping used when data is sent from Azure DevOps to Easit GO.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 | [
{
"identifier": "importHandlerIdentifier1",
"mappingProperties": [
{
"var": "mapStatus",
"file": "Path\\to\\mappingStatusTfsToBps.properties"
}
],
"fields": {
"propertyNameSentToEasitGO1": "${propertyNameValueFromAzureDevOpsSentToEasitGO1}",
"propertyNameSentToEasitGO2": "${propertyNameValueFromAzureDevOpsSentToEasitGO2}",
"propertyNameSentToEasitGO3": "${propertyNameValueFromAzureDevOpsSentToEasitGO3}",
"propertyNameSentToEasitGO4": "${propertyNameValueFromAzureDevOpsSentToEasitGO4}",
}
},{
"identifier": "importHandlerIdentifier2",
"fields": {
"propertyNameSentToEasitGO1": "${propertyNameValueFromAzureDevOpsSentToEasitGO1}",
"propertyNameSentToEasitGO2": "${propertyNameValueFromAzureDevOpsSentToEasitGO2}",
"propertyNameSentToEasitGO3": "${propertyNameValueFromAzureDevOpsSentToEasitGO3}",
"propertyNameSentToEasitGO4": "${propertyNameValueFromAzureDevOpsSentToEasitGO4}",
},
"mappingProperties": [
{
"var": "mapStatus",
"file": "Path\\to\\mappingStatusTfsToBps.properties"
},
{
"var": "mapLifeCycle",
"file": "Path\\to\\mappingLifeCycleTfsToBps.properties"
}
]
},{
"identifier": "importHandlerIdentifier3",
"fields": {
"propertyNameSentToEasitGO1": "${propertyNameValueFromAzureDevOpsSentToEasitGO1}",
"propertyNameSentToEasitGO2": "${propertyNameValueFromAzureDevOpsSentToEasitGO2}",
"propertyNameSentToEasitGO3": "${propertyNameValueFromAzureDevOpsSentToEasitGO3}",
"propertyNameSentToEasitGO4": "${propertyNameValueFromAzureDevOpsSentToEasitGO4}",
}
}
]
|
Mapping object
Let us take a closer look at a more real mapping object.
Mapping
| {
"identifier": "tfsWorkItemUpdated",
"fields": {
"bps_id": "${bps.bps_id}",
"tfs_id": "${tfs.resource.revision.id}",
"tfs_status": "${mapStatus[tfs.resource.revision.fields.'System.State']}",
"tfs_sprint" : "${tfs.resource.revision.fields.'System.IterationPath'}"
}
}
|
identifier
Identifier of import handler that we would like to send data to.
mappingProperties
Contains path to additional mapping for issue types and categories.
fields
Key value-pair of properties that we would like to send to Easit GO. The name of the key will be the property name sent to Easit GO, the value is a mapping of itself to the JSON-data received from Azure DevOps.
With the mapping above and JSON-data from Azure DevOps below, we get the result at the bottom.
JSON-data from Azure DevOps
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | {
"name": "Bug",
"resource": [
{ "revision": {
"id":"65874",
"fields":{
"System.State":"In progress",
"System.IterationPath":"Sprint76",
"MyCompany.TFS.EasitGOID":"965487"
}
}
}
]
}
|
Result
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://www.easit.com/bps/schemas">
<soapenv:Header/>
<soapenv:Body>
<sch:ImportItemsRequest>
<sch:ImportHandlerIdentifier>createJiraIssueIncident</sch:ImportHandlerIdentifier>
<sch:ItemToImport id="965487" uid="965487">
<sch:Property name="bps_id">965487</sch:Property>
<sch:Property name="tfs_id">65874</sch:Property>
<sch:Property name="tfs_status">In progress</sch:Property>
<sch:Property name="tfs_sprint">Sprint76</sch:Property>
</sch:ItemToImport>
</sch:ImportItemsRequest>
</soapenv:Body>
</soapenv:Envelope>
|