Introduction
Jira is used for bug tracking, issue tracking, and project management.
This collaboration integration supports the webhook-based inbound calls with different types of service management requests. For example, you can select one or multiple Entity Types from Incident, Service Request, Problem, and Change.
OpsRamp Cofiguration
Install the Integration
- From All Clients, select a client.
- Go to Setup > Account.
- Select the Integrations and Apps tab.
- The Installed Integrations page, where all the installed applications are displayed. Note: If there are no installed applications, it will navigate to the Available Integrations and Apps page.
- Click + ADD on the Installed Integrations page. The Available Integrations and Apps page displays all the available applications along with the newly created application with the version.
- Search for Jira using the search option available.
Note: Alternatively, you can use the All Categories option to search. - Click ADD on the Jira tile. The Inbound tab is displayed.
Configure the Integration
Based on your requirements, you can configure Inbound, Outbound or both.
Configure the Inbound (From Jira to OpsRamp)
To configure the inbound, follow these steps:
- Authentication:
- OAUTH2. Select OAUTH2 from the Authentication Type dropdown and click Generate Key to generate the Key and Secret.
Note: Keep a copy of the token as the information will not appear again. Read information about the Access Key. - WEBHOOK: Choose “WEBHOOK” as the authentication method, then select the required entity type from the dropdown. Click the Generate Key button to create the Key and Secret pair.
- OAUTH2. Select OAUTH2 from the Authentication Type dropdown and click Generate Key to generate the Key and Secret.
- Map Attributes: Map OpsRamp entity attributes with Jira attributes.
- Click +Add from the Map Attributes section.
- From the Add Map Attributes window, enter the below information:
- OpsRamp Entity: Select the Opsramp entity from dropdown.
- OpsRamp Property: Select the Opsramp property from dropdown. It will change based on entity selection.
- Jira Entity: Enter the Jira entity.
- Jira Property: Enter the Jira property.
- Click +Property Value in the Property Values section, and enter Jira Property Value and OpsRamp Property Value and click Save.
Note:- The Property values section appears based on the OpsRamp Property selected.
- To add property values, click +Property Value.
- To map more attributes, click +Entity.
- Properties:
- Click +Properties from the Properties section.
- Enter the values for the Properties and Value fields and click Save.
Note: To add properties, click +Properties - Click Add Map Attributes.
- Click Next. The Outbound tab is displayed.
Configure the Outbound (From OpsRamp to Jira)
To configure the outbound, follow these steps:
- Configuration: The notification details to trigger integration events are displayed.
- Base URI:
https://{subdomain}.com/arsys/services/ARService?server=onjira-s&webService=OpsRamp_CreateIncident
- Notification Type: Select the Notification Type. Available options are REST API and SOAP API.
- Authentication Type: Based on the Notification Type selected, the Authentication Type differs. Available options are Basic, OAuth2, JWT, None.
- Base URI:
- Map Attributes: From the Map Attributes window, enter the below information:
- OpsRamp Entity: Select the OpsRamp entity from dropdown.
- OpsRamp Property: Select the OpsRamp property from dropdown. It will change based on entity selection.
- Jira Entity: Enter the Jira entity.
- Jira Property: Enter the Jira property.
- Click +Property Value in the Property Values section, and enter Jira Property Value and OpsRamp Property Value and click Save.
Note:- The Property values section appears based on the OpsRamp Property selected.
- To add property values, click on +Property Value.
- To map more attributes, click on +Entity.
- Click Add Map Attributes .
- Events: Events are for sending notifications when an action is performed on OpsRamp entities.
- Click Add in the Events section.
- Enter a name for the event.
- Select the Entity, Entity Type, and Entity Type Event from the drop-down lists.
- (Optional) Under Advanced Settings, enter the values for Property, Operator, and Value and click Save.
- From Actions:
- Select Use Parent Configuration checkbox to inherit parent configuration.
- Enter Endpoint URL.
- Select the Notification Type. Available options are REST API and SOAP API.
- Select the Authentication Type. Based on the Notification Type selected, the Authentication Type differs. Available options are Basic, OAuth2, JWT, None.
- Select the web method.
- Headers:
- Click +Add and enter/select the header name and value.
- Click Save to save the header name.
- (Optional) Click +Add to add more _headers
- Enter the Payload.
- Response:
- Click +Add and enter/select the response name and value.
- Click Save to save the response name.
- (Optional) Click +Add to add more responses.
Note:- The event is created, only if you provide the response properties.
- You cannot enter more than four responses.
- (Optional) Attachment: In the Attachment section, provide inputs in the Process Type, Attachment Endpoint URL, and Web Method fields.
- Attachment Headers: In the Attachment Headers section, provide inputs in the Name and Value fields and click on Save.
- Enter the payload in the Attachment Payload box.
- Enter the Key and Value in the Attachment Response section.
- Click Add Event. The event is added.
There are some actions you can perform on the Events.
See here for more details.
Integration response mapping configuration
Response mapping configuration is mainly based on the response payload that is received in third party payload; below are a few examples for response mapping configuration:
- sample response payload to mapping the id in response mapping:
{ "id":"INC0001", "type":"incident", "tool":"servicedesk" }
external ticket id = $id
We need to append $ to the value - sample response payload to mapping the id in response mapping:
{ "result":{ "id":"INC0001", "type":"incident", "tool":"servicedesk" } }
external ticket id = $result.id
- Sample response payload to mapping the id in response mapping
{ "result":[ { "ticketDetails":{ "id":"INC0001", "type":"incident", "tool":"servicedesk" }, "Description":{ "display_value":"testing description", "value":"validating" } } ] }
external ticket id = $result[0].ticketDetails.id
- sample response payload to mapping the Incident Number in response mapping
{ "result": { "Incident Number": "INC0001", "type": "Incident" } }
external ticket id = $result[‘Incident Number’]
- Failures: In the case of failure in integration, an Email is sent to the user about the failure in integration.
To configure failure notification:- Click add from the Failures section.
- Select notification type as Email.
- Enter the email address(es) in the To and CC fields
- Click Add Failure Notifications. The details are added.
- Click Finish. The integration is installed.
Actions on Integration
You can perform actions on an integration.
- See here for more information.
Actions on Event
Follow these steps to perform actions on the events:
- Click on the integration name.
- Navigate to Outbound tab > Events section.
- Hover over the event name.
- Click the actions (three dots) menu. A popup appears with options.
- Copy Id: To copy an event Id.
- Edit: To edit the event details.
- Save as: To save an event name.
- Validate: Validate if the event is successful.
- Select Json or Form.
- Json: Enter the payload and click on Validate.
- Form: Enter the property and value in the fields and click on Validate.
A green tick appears if the event is successful
- Json: Enter the payload and click on Validate.
- Select Json or Form.
- Remove: To remove an event.
Audit Logs
View logs from the Audit Logs tab. You can view if the event was successful or not.
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.
Update Jira issue with attachment
Fields | Values |
---|---|
Endpoint URL |
|
Headers |
|
Method | POST |
Authentication Type | BASIC |
Username | Jira username |
Password | Jira password |
Request with event tokens
{
"file":"$utils.attachmentMultipart($incident.latestResponse.resourceList,$incident.client.uniqueId,$installedAppId,$incident.uniqueId,$incident.latestResponse.id,$entity)"
}
Response
[
{
"self": "https://jira.atlassian.net/rest/api/3/attachment/10000",
"id": "10000",
"filename": "file.txt",
"created": "2021-03-31T09:02:00.991+0530",
"size": 181,
"mimeType": "text/html",
"content": "https://jira.atlassian.net/secure/attachment/10000/file.txt"
}
]
Update Jira issue status
Fields | Values |
---|---|
Endpoint URL |
|
Headers |
|
Method | POST |
Authentication Type | BASIC |
Username | Jira username |
Password | Jira password |
Request with event tokens
{
"transition": {
"id": "[@$incident.status.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.
Jira Configuration
Configure Jira to add the webhook URL copied during OpsRamo configuration.
- Log into Jira.
- Navigate to Settings, System WebHooks.
- Configure the New Webhook Listener with the Webhook Url generated during OpsRamp configuration and click Save.
If no external ticket ID Mappings are provided, add &extTicketId=${issue.id} at the end of webhook URL copied from OpsRamp.