This automation rule will create a roadmap item on your LaunchNotes account when you create an epic (or whatever issue type you'd like to use), in Jira. In order to set this up, you'll need the following information from your LaunchNotes account:
Jira Setup
In Jira, go to Project Settings > Apps > Project automation > Rules > Create rule:
New Trigger: When: Issue created
New condition: Issue fields condition
Field: Issue Type
Condition: Equals
Value: Epic
Add Component:
New action: Send web request
Webhook URL: https://app.launchnotes.io/graphql
Headers:
Authorization: Bearer manage_{TOKEN_ID}
HTTP Method: Post
Webhook body: Custom Data:
{
"query":"mutation createWorkItem (\n $name: String!\n $stageId: ID!\n $categories: [CategoryAttributes!]\n $contentJira: String\n) {\n createWorkItem(input: {\n workItem: {\n name: $name,\n stageId: $stageId,\n categories: $categories,\n contentJira: $contentJira\n }\n}){\n workItem {\n id\n}\n}\n}",
"variables":{
"projectId":"YOUR_PROJECT_ID",
"name":"{{issue.summary.jsonEncode}}",
"contentJira":"{{issue.description.jsonEncode}}",
"stageId":"YOUR_STAGE_ID",
"categories":[{"id": "cat_CJVj1rlvd00DD"}, {"id": "cat_ZdWV2j2YdZ3JC"}]
}
}
Select Wait for response β "Delay execution of subsequent rule actions until we've received a response for this webhook"
π‘ If using categories, the category arrtibute needs to be an array of CategoryAttribues
(ID's), structures an as object as shown in the example above.
Example screenshot:
Now this is set up, the next step is to identify and attach the LaunchNotes roadmap work item ID to your Epic, once it has been created in LaunchNotes created via the Jira Automation.
Continue adding to the rule:
Add component: New component
New action: Edit Issue fields: Update certain issue fields, and then find the LaunchNotes field created earlier when setting up your Jira automation in the dropdown menu, and enter the following into the field : {{webhookResponse.body.data.createWorkItem.workItem.id}}
Test this out by creating a New Epic in Jira. Now when this is saved out, the field launch_notes_work_item_id
should be populated with the LaunchNotes roadmap work item ID: