Skip to content

jira.json

This JSON file holds an array of objects with each object representing a mapping used when data is sent from Easit GO to Jira.

 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
    [
        {
            "identifier": "exportConfigurationIdentifier1",
            "mappingProperties": [
                {
                    "var": "mapType",
                    "file": "Path/to/mappingTypeBpsToJira.properties"
                },
                {
                    "var": "mapCategoryToProject",
                    "file": "Path/to/mappingCategoryBpsToJiraProject.properties"
                }
            ],
            "fields": {
                "fieldNameInJira1": ["${propertyNameValueFromEasitGOSentToJira1}"],
                "fieldNameInJira2": "${propertyNameValueFromEasitGOSentToJira2}",
                "fieldNameInJira3": "${propertyNameValueFromEasitGOSentToJira3}",
                "connectionFieldNameInJira1": {
                    "key": "${utilClass.useDefaultIfNotFound(mapCategoryToProject[propertyNameValueFromEasitGOSentToJira4], \"PAN\")}"
                },
                "issuetype": {
                    "name": "${mapType[bps.type]}"
                },
                "fieldNameInJira4": ["${propertyNameValueFromEasitGOSentToJira5}"],
                "fieldNameInJira5": "${propertyNameValueFromEasitGOSentToJira6==''? null : {'value': propertyNameValueFromEasitGOSentToJira7}}",
                "fieldNameInJira6": "${utilClass.convertDate(propertyNameValueFromEasitGOSentToJira8, \"yyyy-MM-dd HH:mm:ss\", \"yyyy-MM-dd\")}"
            }
        }
    ]

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
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
    [
        {
            "identifier": "createJiraIssueIncident",
            "mappingProperties": [
                {
                    "var": "mapType",
                    "file": "D:/Easit/JiraConnector/config/mappingTypeBpsToJira.properties"
                },
                {
                    "var": "mapCategoryToProject",
                    "file": "D:/Easit/JiraConnector/config/mappingCategoryBpsToJiraProject.properties"
                }
            ],
            "fields": {
                "customfield_14400": ["${bps.bps_id}"],
                "summary": "${bps.summary}",
                "description": "${bps.description}",
                "project": {
                    "key": "${utilClass.useDefaultIfNotFound(mapCategoryToProject[bps.category_2], \"PAN\")}"
                },
                "issuetype": {
                    "name": "${mapType[bps.type]}"
                },
                "customfield_14302": ["${bps.reporter_email}"],
                "customfield_12901": "${bps.category_2==''? null : {'value': bps.category_2}}",
                "customfield_14303": "${utilClass.convertDate(bps.created, \"yyyy-MM-dd HH:mm:ss\", \"yyyy-MM-dd\")}"
            }
        }
    ]

identifier

Identifier defined in event handler in Easit GO that post data to the connector.

mappingProperties

Contains path to additional mapping for issue types and categories.

fields

Key value-pair of properties that we would to send to Jira. Name of key will be the property name sent to Jira, value is a mapping of itself to the data posted from Easit GO.

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

Data from Easit GO

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
    <EasitImport type="" version="1.0">
        <Items>
            <Item uid="965487">
                <Properties>
                    <Property name="bps_id">965487</Property>
                    <Property name="summary">summeryFromEasitGO</Property>
                    <Property name="description">descriptionFromEasitGO</Property>
                    <Property name="reporter_email">my.email@company.com</Property>
                    <Property name="category_2">nameOfCategory</Property>
                    <Property name="created">2023-09-14 12:00:00</Property>
                </Properties>
                <Attachments/>
            </Item>
        </Items>
        <ClientInfo>
            <ClientName>Easit BPE</ClientName>
            <ClientProperties>
                <ClientProperty name="identifier">createJiraIssueIncident</ClientProperty>
                <ClientProperty name="initializedByXmlExport">MCwCFHNcPkffg/Elwb8ZeIuQ/IeNwgB6AhQUy2AizQfpVxHVWnIkaXpqO079GQ==</ClientProperty>
            </ClientProperties>
        </ClientInfo>
    </EasitImport>

Result

 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
    [
        {
            "identifier": "createJiraIssueIncident",
            "mappingProperties": [
                {
                    "var": "mapType",
                    "file": "D:/Easit/JiraConnector/config/mappingTypeBpsToJira.properties"
                },
                {
                    "var": "mapCategoryToProject",
                    "file": "D:/Easit/JiraConnector/config/mappingCategoryBpsToJiraProject.properties"
                }
            ],
            "fields": {
                "customfield_14400": ["965487"],
                "summary": "summeryFromEasitGO",
                "description": "descriptionFromEasitGO",
                "project": {
                    "key": "${utilClass.useDefaultIfNotFound(mapCategoryToProject[bps.category_2], \"PAN\")}"
                },
                "issuetype": {
                    "name": "${mapType[bps.type]}"
                },
                "customfield_14302": ["my.email@company.com"],
                "customfield_12901": "nameOfCategory",
                "customfield_14303": "2023-09-14 12:00:00"
            }
        }
    ]