Introduction
JIRA is tool used for bug tracking, issue tracking, and project management. JIRA with OpsRamp is a one-way integration.
OpsRamp configuration
Configuration involves:
- Installing the integration.
- Configuring the integration.
Step 1: Install the integration
To install:
- From All Clients, select a client.
- Go to Setup > Integrations > Integrations.
- From Available Integrations, select Collaboration > JIRA.
- Click Install.
Step 2: Configure the integration
Configure the following:
- Inbound - As this is a one-way integration, only outbound is required.
- Outbound
- Monitoring of Integration
- Audit Logs
Outbound
To send entities from OpsRamp to JIRA:
- In Integration Basic Configuration, configure notification details to trigger integration events.
- Notification Type: REST API
- BASE URI:
https://{subdomain}.com/rest/api/2/issue/
- Authentication Type: BASIC
- Provide username and password and then click Save.
- In Map Attributes, map OpsRamp entity attributes with JIRA attributes.
- Select the attribute, click Map and Create Integration Mapping window appears.
- Provide the values and then click Save.
- In Integration Events, specify the event. An action performed on an entity is defined as an event.
When an event is triggered, notifications are sent to the respective users.
- Click Add and Add Integration Event page appears.
- Provide a name for the integration event.
- Select Service Desk, select entity and then select the action.
- Select Parent Configuration to assign basic integration configuration details to the event.
- Select the web method and provide the header name and value.
- Provide the payload for the respective action.
- A custom field that is already configured as response payload attribute for a given integration is not available for configuration in any other integrations. You need to remove the existing mapping from the integration to make the custom field available to map on response payload of any other integration.
- To add additional tokens to the payload, click on the token in the Place Holder list.
- To parse the properties returned in the response, select the property from the drop-down and provide the value.
For example, To parse issue key$key
of JIRA with OpsRamp, select the property as EXT_ENTITY_ID (external entity ID) in OpsRamp .
- Verify Integration, validate if the integration is successful.
- Select the event from the drop-down and then select payload type.
- Provide the payload values and then click Verify.
- For Integration Failures: In the case of failure in integration, a message is sent to the configured email address.
- Select the notification type Email, provide the email address, and click Save.
Integration event payloads
Fields | Values |
---|---|
Endpoint URL | https://{subdomain}.com/helpdesk/tickets |
Headers |
|
Method | POST |
Authentication type | BASIC |
Username | JIRA username |
Password | JIRA password |
Request with hard-coded values
{
"fields" : {
"project" : {
"key" : "IT"
},
"summary" : "Test ticket from OpsRamp integration REST API plugin",
"description" : "Creating of an issue using OpsRamp integration REST API plugin",
"issuetype" : {
"name" : "Bug"
},
"priority" : {
"name" : "Critical"
},
"components" : [
{
"name" : "Component-1"
}
]
}
}
Request with event tokens
{
"fields" : {
"project" : {
"key" : "IT"
},
"summary" : "$incident.subject",
"description" : "$incident.impact",
"issuetype" : {
"name" : "$incident.customFields.clientCustomFieldValues.values_1_25.value_1"
},
"priority" : {
"name" : "[@$incident.priority.name@]"
},
"components" : [
{
"name" : "$incident.customFields.clientCustomFieldValues.values_1_25.value_2"
}
]
}
}
Response
{
"id" : "27999",
"key" : "IT-1",
"self" : "https://jira.opsramp.net:443/rest/api/2/issue/27999"
}
Update JIRA issue
Fields | Values |
---|---|
Endpoint URL |
|
Headers |
|
Method | POST |
Authentication Type | BASIC |
Username | JIRA username |
Password | JIRA password |
Request with event tokens
{
"fields" : {
"priority" : {
"name" : "[@$incident.priority.name@]"
}
}
}
Response
Status code 204 No Content is displayed.
Add comment to JIRA issue
The following parameters provide values for adding comments to a JIRA issue.
Fields | Values |
---|---|
Endpoint URL |
|
Headers |
|
Method | POST |
Authentication Type | BASIC |
Username | JIRA username |
Password | JIRA password |
Request with hard-coded values
{
"body" : "Test comment added"
}
Response
Status code 201 is displayed.