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:

  1. Installing the integration.
  2. Configuring the integration.

Step 1: Install the integration

To install:

  1. From All Clients, select a client.
  2. Go to Setup > Integrations > Integrations.
  3. From Available Integrations, select Collaboration > JIRA.
  4. 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:

  1. In Integration Basic Configuration, configure notification details to trigger integration events.
    1. Notification Type: REST API
    2. BASE URI: https://{subdomain}.com/rest/api/2/issue/
    3. Authentication Type: BASIC
    4. Provide username and password and then click Save.
  2. In Map Attributes, map OpsRamp entity attributes with JIRA attributes.
    1. Select the attribute, click Map and Create Integration Mapping window appears.
    2. Provide the values and then click Save.
  3. 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.
    1. Click Add and Add Integration Event page appears.
    2. Provide a name for the integration event.
    3. Select Service Desk, select entity and then select the action.
    4. Select Parent Configuration to assign basic integration configuration details to the event.
    5. Select the web method and provide the header name and value.
    6. 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 .
        Add Integration Event

        Add Integration Event

  4. Verify Integration, validate if the integration is successful.
    1. Select the event from the drop-down and then select payload type.
    2. Provide the payload values and then click Verify.
  5. 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

Field Values
FieldsValues
Endpoint URLhttps://{subdomain}.com/helpdesk/tickets
Headers
  • Accept: application/json
  • Content-Type: application/json
MethodPOST
Authentication typeBASIC
UsernameJIRA username
PasswordJIRA 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

Field Values
FieldsValues
Endpoint URL
  • Hard-coded issue key: https://{subdomain}.com/helpdesk/tickets
  • Replaced key with token: https://{subdomain}.com/rest/api/2/issue/${incident.extTicketId}
Headers
  • Accept: application/json
  • Content-Type: application/json
MethodPOST
Authentication TypeBASIC
UsernameJIRA username
PasswordJIRA 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.

Field Values
FieldsValues
Endpoint URL
  • Hard-coded issue key: https://{subdomain}.com/rest/api/2/issue/IT-3/comment
  • Replaced key with token: https://{subdomain}.com/rest/api/2/issue/${incident.extTicketId}/comment
Headers
  • Accept: application/json
  • Content-Type: application/json
MethodPOST
Authentication TypeBASIC
UsernameJIRA username
PasswordJIRA password
Request with hard-coded values
{
	"body" : "Test comment added"
}
Response

Status code 201 is displayed.