Examples
Five Jira node configurations: bug from alert, JQL sprint query, PR-triggered transition, deployment comment, and sprint creation with backlog move.
Example 1: Create a Bug Issue from an Error Alert Webhook
{
"Resource": "issue",
"Operation": "create",
"ProjectKey": "{{ env.JIRA_ENG_PROJECT_KEY }}",
"IssueType": "Bug",
"Summary": "[{{ vars.severity }}] {{ vars.service_name }}: {{ vars.error_type }} — {{ vars.environment }}",
"Description": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [{ "type": "text", "text": "Auto-created by BizFirst monitoring workflow." }]
},
{
"type": "heading", "attrs": { "level": 3 },
"content": [{ "type": "text", "text": "Error Details" }]
},
{
"type": "codeBlock", "attrs": { "language": "text" },
"content": [{ "type": "text", "text": "{{ vars.error_message }}\n\n{{ vars.stack_trace }}" }]
},
{
"type": "heading", "attrs": { "level": 3 },
"content": [{ "type": "text", "text": "Context" }]
},
{
"type": "bulletList",
"content": [
{ "type": "listItem", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "Service: {{ vars.service_name }}" }] }] },
{ "type": "listItem", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "Environment: {{ vars.environment }}" }] }] },
{ "type": "listItem", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "Alert ID: {{ vars.alert_id }}" }] }] },
{ "type": "listItem", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "Dashboard: {{ vars.dashboard_url }}" }] }] }
]
}
]
},
"Priority": "{{ vars.jira_priority }}",
"Assignee": "{{ vars.oncall_jira_account_id }}",
"Labels": ["{{ vars.environment }}", "{{ vars.service_name }}", "auto-created"],
"Components": ["{{ vars.service_component }}"]
}
Expected outcome: A richly formatted Jira bug is created with a code block containing the error and stack trace, a bullet list with context links, and the on-call engineer assigned. The output
key (e.g. ENG-247) is passed to a Slack node to post an alert with a direct link to the Jira issue.Example 2: Search for All Open Bugs in the Current Sprint Using JQL
{
"Resource": "issue",
"Operation": "getMany",
"Jql": "project = {{ env.JIRA_ENG_PROJECT_KEY }} AND issuetype = Bug AND status != Done AND sprint in openSprints() ORDER BY priority DESC, created ASC",
"MaxResults": 50,
"Fields": "summary,status,priority,assignee,labels,created,updated"
}
Expected outcome: Returns up to 50 open bugs in the current sprint sorted by priority then creation date. The
issues array is passed to a DataMapping node that builds a formatted Slack message with a bullet list of bug keys, summaries, priorities, and assignee names. Unassigned bugs are highlighted for triage.Example 3: Transition Issue to "In Review" When a PR is Opened
Step 1 — Extract the Jira issue key from the PR branch name using a DataMapping node:
// Expression to extract issue key from branch like "feature/ENG-142-add-payment-retry"
{{ regexMatch(trigger.output.head_branch, '[A-Z]+-[0-9]+')[0] }}
Step 2 — Transition the issue:
{
"Resource": "issue",
"Operation": "transition",
"IssueKey": "{{ vars.extracted_issue_key }}",
"TransitionName": "In Review"
}
Step 3 — Add a linking comment:
{
"Resource": "issue",
"Operation": "addComment",
"IssueKey": "{{ vars.extracted_issue_key }}",
"Comment": "Pull request opened: [{{ trigger.output.pr_title }}|{{ trigger.output.html_url }}]\n\nOpened by {{ trigger.output.user_login }} — ready for code review."
}
Expected outcome: The Jira issue is automatically transitioned to "In Review" and a comment with a direct link to the PR is added. Reviewers can navigate between the PR and the Jira issue seamlessly. No manual status update is required from the developer.
Example 4: Add a Comment with Deployment Details to a Release Issue
{
"Resource": "issue",
"Operation": "addComment",
"IssueKey": "{{ vars.release_issue_key }}",
"Comment": {
"version": 1,
"type": "doc",
"content": [
{
"type": "panel",
"attrs": { "panelType": "success" },
"content": [
{
"type": "paragraph",
"content": [{ "type": "text", "text": "Deployment to {{ vars.environment }} completed successfully.", "marks": [{ "type": "strong" }] }]
}
]
},
{
"type": "table",
"attrs": { "isNumberColumnEnabled": false },
"content": [
{
"type": "tableRow",
"content": [
{ "type": "tableHeader", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "Property" }] }] },
{ "type": "tableHeader", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "Value" }] }] }
]
},
{
"type": "tableRow",
"content": [
{ "type": "tableCell", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "Version" }] }] },
{ "type": "tableCell", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "{{ vars.version }}" }] }] }
]
},
{
"type": "tableRow",
"content": [
{ "type": "tableCell", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "Environment" }] }] },
{ "type": "tableCell", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "{{ vars.environment }}" }] }] }
]
},
{
"type": "tableRow",
"content": [
{ "type": "tableCell", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "Deployed At" }] }] },
{ "type": "tableCell", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "{{ vars.deployed_at }}" }] }] }
]
},
{
"type": "tableRow",
"content": [
{ "type": "tableCell", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "Deployed By" }] }] },
{ "type": "tableCell", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "{{ vars.deployed_by }}" }] }] }
]
}
]
}
]
}
}
Expected outcome: A formatted ADF comment with a success panel and deployment details table is added to the release issue. The audit trail is visible directly in Jira alongside the issue history. Stakeholders can review deployment details without leaving Jira.
Example 5: Create Sprint and Move Stories to It from Backlog
Step 1 — Create the sprint:
{
"Resource": "sprint",
"Operation": "create",
"BoardId": "{{ env.JIRA_BOARD_ID }}",
"Name": "Sprint {{ vars.sprint_number }}",
"StartDate": "{{ vars.sprint_start_date }}",
"EndDate": "{{ vars.sprint_end_date }}",
"Goal": "{{ vars.sprint_goal }}"
}
Step 2 — Query the top backlog stories by priority:
{
"Resource": "issue",
"Operation": "getMany",
"Jql": "project = {{ env.JIRA_ENG_PROJECT_KEY }} AND issuetype = Story AND status = 'To Do' AND sprint is EMPTY AND priority in (Highest, High) ORDER BY priority DESC, rank ASC",
"MaxResults": "{{ vars.sprint_capacity_stories }}",
"Fields": "summary,priority,status,storyPoints"
}
Step 3 — Add the stories to the new sprint:
{
"Resource": "sprint",
"Operation": "addIssues",
"SprintId": "{{ nodes.createSprint.output.id }}",
"IssueKeys": "{{ map(nodes.getBacklogStories.output.issues, issue => issue.key) }}"
}
Expected outcome: A new sprint is created on the board, the top-priority backlog stories (up to the configured capacity count) are moved to it, and a Slack message is posted to the team channel with the sprint name, goal, and a link to the Jira board. The sprint is ready to be activated by the Scrum Master in Jira.