Skip to content

bps.json

This JSON file holds an array of objects with each object representing a mapping used when data is sent from Jira 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
    [
        {
            "identifier": "importHandlerIdentifier1",
            "fields": {
                "propertyNameSentToEasitGO1": "${propertyNameValueFromJiraSentToEasitGO1}",
                "propertyNameSentToEasitGO2": "${propertyNameValueFromJiraSentToEasitGO2}",
                "propertyNameSentToEasitGO3": "${propertyNameValueFromJiraSentToEasitGO3}",
                "propertyNameSentToEasitGO4": "${propertyNameValueFromJiraSentToEasitGO4}",
            }
        },{
            "identifier": "importHandlerIdentifier2",
            "fields": {
                "propertyNameSentToEasitGO1": "${propertyNameValueFromJiraSentToEasitGO1}",
                "propertyNameSentToEasitGO2": "${propertyNameValueFromJiraSentToEasitGO2}",
                "propertyNameSentToEasitGO3": "${propertyNameValueFromJiraSentToEasitGO3}",
                "propertyNameSentToEasitGO4": "${propertyNameValueFromJiraSentToEasitGO4}",
            }
        },{
            "identifier": "importHandlerIdentifier3",
            "fields": {
                "propertyNameSentToEasitGO1": "${propertyNameValueFromJiraSentToEasitGO1}",
                "propertyNameSentToEasitGO2": "${propertyNameValueFromJiraSentToEasitGO2}",
                "propertyNameSentToEasitGO3": "${propertyNameValueFromJiraSentToEasitGO3}",
                "propertyNameSentToEasitGO4": "${propertyNameValueFromJiraSentToEasitGO4}",
            }
        }
    ]

Mapping object

Let us take a closer look at a more real mapping object.

Mapping

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
    {
        "identifier": "createJiraIssueIncident",
        "fields": {
            "bps_id": "${bps.bps_id}",
            "jira_id": "${jira.id}",
            "jira_key": "${jira.key}",
            "jira_link": "http://jira/browse/${jira.key}",
            "jira_status":"${jira.fields.status}",
            "jira_customField":"${jira.fields.customfield_99999}",
            "staticProperty":"StaticValue"
        }
    }

identifier

Identifier of import handler that we would like to send data to.

fields

Key value-pair of properties that we would to send to Easit GO. Name of key will be the property name sent to Easit GO, value is a mapping of itself to the response received from Jira. As you can see in the example above, you can also use static values. This was you can have one or more value also be sent to Easit GO.

With the mapping above and response from Jira below, we get the result at the bottom.

Response from Jira

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
    {
        "expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
        "id": "10002",
        "self": "http://www.example.com/jira/rest/api/2/issue/10002",
        "key": "EX-1",
        "fields": {
            "status":"To do",
            "customfield_99999":"customFieldValue",
        }
    }

Result

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
    <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="10002" uid="10002">
                    <sch:Property name="bps_id">999999</sch:Property>
                    <sch:Property name="jira_id">10002</sch:Property>
                    <sch:Property name="jira_key">EX-1</sch:Property>
                    <sch:Property name="jira_link">http://jira/browse/EX-1</sch:Property>
                    <sch:Property name="jira_status">To do</sch:Property>
                    <sch:Property name="customfield_99999">customFieldValue</sch:Property>
                    <sch:Property name="staticProperty">StaticValue</sch:Property>
                </sch:ItemToImport>
            </sch:ImportItemsRequest>
        </soapenv:Body>
        </soapenv:Envelope>