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.
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.
Ensure your IAM user has the following GCP roles/permissions in your Google Cloud project.
For this lab, we will create a Pub/Sub topic:
Create a new integration by performing the following steps:
To add a Cloud Pub/Sub trigger to the integration, follow the steps below:
1. Go to "TASKS" drowdown at the top, search for "connector" and drag and drop a connector into the canvas.
2. Select the newly-created connector task, and click the button "Configure Connector".
3. Click "Create Connection".
4. Select JIRA, and configure section 1, Connection details as per the following screenshot:
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).
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).
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".
7. Finally, click "Create" to start the provisioning of the connection. After a few minutes, the connection should be created.
1. Go back to the integration, and click on the "connector" task, and click again "Configure Connector" on the right panel.
2. Configure the connector according to the following values. We will create a JIRA issue through this connector.
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:
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.
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.
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.
7. Exit the data mapper and go back to the integration canvas.
1. Publish the integration:
2. Go to the pub/sub topic, and publish a message through the "Publish Message" button:
3. Publish a message with the content for the issue to be created in JIRA:
4. Go to the integration logs and check the latest integration execution, it should be successful.
5. An issue is successfully created in JIRA.
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.
Ensure your IAM user has the following GCP roles/permissions in your Google Cloud project.
2. Scroll down to the "Event Subscription details" section and fill in the host, username and API Token.
3. Click "SAVE" at the bottom and wait for the connection to activate.
Create a new integration by performing the following steps:
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.
3. Click on the element, and click the "CONFIGURE JIRA CLOUD TRIGGER" button in the integration editor to view the trigger configuration pane.
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.
1. Go to "TASKS" dropdown at the top, search for "email", and drag and drop the "Send Email" task into the canvas.
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.
3. Connect both tasks with an arrow, and publish the integration. Your final integration should look like the below:
1. Go to your JIRA board, and create a new issue.
2. You should see a new execution of the integration in the logs, and email being received at the email address you provided earlier.