Application Integration - JIRA Connection & JIRA Trigger

Application Integration | JIRA Connection & JIRA insert

JIRA is one of the most widely-used enterprise systems across organizations. It is used to manage projects, customer service and several other functions.

Application Integration offers an out-of-the-box JIRA connection, which can be used to connect to JIRA easily and create/update/delete issues, fields, comments, epics etc. In addition, Application Integration also offers a JIRA triggers, which enables an integration to be automatically triggered when an entity in JIRA is created/updated/deleted such as a field, issue, comment etc.

Overview

You will create an integration with a Cloud Pub/Sub trigger to listen to an existing Pub/Sub topic that receives issue information. This issue information would be transformed to JIRA's format using data mapper and an issue in JIRA would be created.

Before you begin

Ensure your IAM user has the following GCP roles/permissions in your Google Cloud project.

  • Pub/Sub Editor.
  • Application Integration Invoker.

Set up environment

For this lab, we will create a Pub/Sub topic:

  1. Go to the Pub/Sub topics page in the Cloud console.
  2. Click Create a topic.
  3. In the Topic ID field, provide a unique topic name.
  4. Click Create.
  5. In the next screen which appears, note down the path to the topic.

alt text

Create a New Integration

Create a new integration by performing the following steps:

  1. In the Google Cloud console, go to the Application Integration page.
  2. In the navigation menu, click Integrations. The Integrations List page appears.
  3. Click Create integration.
  4. Enter a name and description in the Create Integration dialog. For example, PubSubtoJIRA. Replace the prefix with an appropriate value similar to the prefix you used in the above step while creating the Topic.
  5. Select a region for the integration
  6. Click Create to open the integration editor

Create and Configure a Cloud Pub/Sub trigger

To add a Cloud Pub/Sub trigger to the integration, follow the steps below:

  1. In the integration editor, select Triggers to display a list of available triggers.
  2. Click and place the Cloud Pub/Sub trigger element to the designer.
  3. Click the Cloud Pub/Sub trigger element in the integration editor to view the trigger configuration pane.
  4. Specify the topic the trigger should listen to in the Pub/Sub topic field - projects/{projectID}/topics/
  5. Select an existing service account or create a new service account. Click the GRANT button to assign the appropriate permissions
  6. See screenshot below

alt text

alt text

Create the JIRA connector

1. Go to "TASKS" drowdown at the top, search for "connector" and drag and drop a connector into the canvas.

alt text

2. Select the newly-created connector task, and click the button "Configure Connector".

alt text

3. Click "Create Connection".

alt text

4. Select JIRA, and configure section 1, Connection details as per the following screenshot:

alt text

5. Configure section 2 as per the following screenshot. (note: enter the JIRA hostname from your own account, or provided by the instructor if you are performing this lab with the help of an instructor).

alt text

6. Configure section 3 as per the following screenshot.(note: enter the JIRA user from your own account, or provided by the instructor if you are performing this lab with the help of an instructor).

alt text

Click on "Create New Secret" as per the following screenshot, and enter your JIRA API key in the field for "Secret Value", and click "Create Secret". If you are asked to grant access to this secret to the service account, click "Grant".

alt text

7. Finally, click "Create" to start the provisioning of the connection. After a few minutes, the connection should be created.

Finish configuring the integration

1. Go back to the integration, and click on the "connector" task, and click again "Configure Connector" on the right panel.

alt text

2. Configure the connector according to the following values. We will create a JIRA issue through this connector.

alt text

3. Back in the integration, select the "Data Mapping" task from the TASKS drop-down and drag and drop the task into the canvas. Configure it in the following way:

alt text

4. In the first row of the data mapping, click on the text "Variable or Value", and drag and drop the variable CloudPubSubMessage.data from the left. For the output, expand the variable "ConnectorsInputPayload" on the left, find the parameter "Summary", and drag-and-drop it into the output.

alt text

5. In the second row of the data mapping, enter the string "KAN"(or another value if you are using your own account and using a different name for the JIRA project), and map it to connectorInputPayload.ProjectKey. The JIRA connector needs to know which project the issue would be created in.

alt text

6. In the third row of the data mapping, enter the string "Task" since we want to create an issue of the type "Task", and map it to connectorInputPayload.IssueTypeName.

alt text

7. Exit the data mapper and go back to the integration canvas.

Publish and Test the integration

1. Publish the integration:

alt text

2. Go to the pub/sub topic, and publish a message through the "Publish Message" button:

alt text

3. Publish a message with the content for the issue to be created in JIRA:

alt text

4. Go to the integration logs and check the latest integration execution, it should be successful.

alt text

5. An issue is successfully created in JIRA.

alt text

JIRA Trigger

Overview

You will create an integration with a JIRA trigger to get updates about a new JIRA issue being created. After getting the notification about a JIRA issue being created, the integration sends an email notifying a user about the creation of the issue. This lab builds on top of the JIRA connector you built above.

Before you begin

Ensure your IAM user has the following GCP roles/permissions in your Google Cloud project.

  • Application Integration Invoker.

Create an event subscription in the previously create JIRA connection

The JIRA connection created previously has to be enabled with an event subscription.

1. Go to the connections page, click the previously created JIRA connection and click "EDIT at the top"

JIRAconnectionEdit.png2. Scroll down to the "Event Subscription details" section and fill in the host, username and API Token.

JIRAEventSubscriptionDetails.png 3. Click "SAVE" at the bottom and wait for the connection to activate.

Create a New Integration

Create a new integration by performing the following steps:

  1. In the Google Cloud console, go to the Application Integration page.
  2. In the navigation menu, click Integrations. The Integrations List page appears.
  3. Click Create integration.
  4. Enter a name and description in the Create Integration dialog. For example, JIRA-Trigger.
  5. Select a region for the integration
  6. Click Create to open the integration editor

alt text

Create and Configure a JIRA trigger

To add a Cloud JIRA trigger to the integration, follow the steps below:

1. In the integration editor, select Triggers to display a list of available triggers.

2. Click and place the Cloud JIRA trigger element to the designer.

alt text

3. Click on the element, and click the "CONFIGURE JIRA CLOUD TRIGGER" button in the integration editor to view the trigger configuration pane.

alt text

4. Specify the details as per the following screenshot. Re-use the JIRA connection created previously. In the "Event Type Id" field, multiple events are available, such as addition of a comment, deletion of an issue etc. IN this lab, we will use the creation of an issue to trigger the integration.

alt text

Create the EMAIL task

1. Go to "TASKS" dropdown at the top, search for "email", and drag and drop the "Send Email" task into the canvas.

alt text

2. Select the newly-created Email task, and configure the "To" and "Subject" fields. provide your email ID in the "To" fields and the string "New JIRA issue created" in the "Subject" field.

alt text

3. Connect both tasks with an arrow, and publish the integration. Your final integration should look like the below:

alt text

Test the integration

1. Go to your JIRA board, and create a new issue.

alt text

alt text

2. You should see a new execution of the integration in the logs, and email being received at the email address you provided earlier.

alt text

Contributors
Version history
Last update:
‎01-08-2025 11:30 AM
Updated by: