...
First step is to create an inbound integrationconsumer in the Incoming Webhooks section, this will allow iHub to read messages posted on the Kafka queue. That is called the WHEN section of the inbound incoming integration. On the THEN section you will need to specify the Action that iHub will do in Jira. Actions in the THEN sections are defined in the outbound integrations menu. So the inbound incoming integration will pass the data received down to a outbound action (defined in the integrations menu), in many cases there is also a need to route it to the correct outbound integration based on a condition in the message received, this is done in the IF section.
The outbound integration message defined in this tutorial is one for Create Issue and one for Updating an Issue. This is part 2 of the tutorial.
Step 1 - Add
...
Incoming Integration
Goto Inbound Integrations Incoming Webhooks and click Create Rule and select Kafka.
Incoming Webhooks define any incoming data, hence it is extended with Kafka to read topics.
Enter the Kafka Topic name to read from
Enter the Key and Value deserializer.
Select the Action that shall take the input from each Kafka message and perform something in Jira.
optional specify a Data condition
...
Step 2. - Add
...
Integration to creata a Jira Issue
Click New (Action)
Select Template Category: Jira Core
Select Template: Create Issue
Click Create
Select a basic Auth Jira user see Basic Auth
Add Body
Code Block language js { "fields": { "project": { "id": "12200" }, "summary": "{{name}}", "issuetype": { "id": "10001" }, "reporter": { "name": "kg" }, "labels": [ "kafka" ], "description":"{{description}}", "customfield_10201":"{{someother_data}}" } }
This will create the issue based on the incoming data from Kafka. In the message we are sending
...
the data in the message gets converted to an object that we can access using mustache syntax {{name}} etc.
Step 3. - Add
...
Integration to update a Jira Issue
Click New (Action)
Select Template Category: Jira Core
Select Template: Edit Issue
Click Create
Change the URL {{baseUrl}}/rest/api/2/issue/{{issue.key}} to {{baseUrl}}/rest/api/2/issue/{{key}}
Select a basic Auth Jira user see Basic Auth
Add Body
Code Block language js { "fields": { "description":"{{description}}", "customfield_10201":"{{someother_data}}" } }
This will create the issue based on the incoming data from Kafka. In the message we are sending
...