How do I trigger Jira automation from risk level changes
This guide explains how to implement a practical workaround for a current Jira Cloud limitation: triggering automation when Risk Register recalculates a risk level. The approach uses ScriptRunner for Jira Cloud to detect the Risk Register entity property change and then deliberately updates a normal Jira field or calls an automation webhook so Jira Automation can react.
Risk Register currently stores calculated assessment values in an issue entity property, typically pbrr-assessment. Native Jira Automation does not reliably react when Risk Register toggles change that entity property directly, so a bridge is needed.
This is an advanced configuration. It is best suited to an experienced Jira administrator who is comfortable with ScriptRunner listeners, Jira webhooks, and issue entity properties.
What problem this solves
In the support case, the customer updates Risk Register toggles on an issue. Risk Register recalculates the risk level, for example from MAJOR to MINOR, but Jira Automation does not fire because the underlying change is happening in an entity property rather than through a standard field update event.
This creates two practical issues:
Automation rules based on “field changed” or “issue updated” do not run when the risk assessment is changed in the Risk Register UI.
The visible read-only Jira field may not refresh immediately on screen, so the user can still see the old value until Jira refreshes or background synchronisation completes.
Short answer: use ScriptRunner as a bridge between the Risk Register entity property update and Jira Automation.
Recommended solution pattern
The most reliable pattern is:
Listen for the Risk Register assessment change.
Read the updated
pbrr-assessmententity property.Extract the newly calculated risk level.
Trigger downstream automation in one of two ways:
Option A: update a dedicated Jira custom field such as
Risk Level Trigger, then use a normal Jira Automation Field value changed trigger.Option B: call a Jira Automation Incoming webhook directly from ScriptRunner.
For most admins, Option A is easier to support and troubleshoot because the value is visible on the issue, searchable, and easy to test with standard automation rules.
Architecture overview
The flow looks like this:
User changes impact/probability using the Risk Register controls.
Risk Register saves the assessment into
pbrr-assessment.ScriptRunner detects the update event relevant to the issue.
ScriptRunner fetches the latest entity property payload.
ScriptRunner derives the current risk level from that payload.
ScriptRunner either updates a standard Jira field or sends a webhook.
Jira Automation runs from that normal trigger.
Why this workaround is needed
ProjectBalm support has already confirmed that Risk Register stores the calculated level as an issue entity property and that standard Jira Automation triggers do not run when the Risk Register toggles are changed. Internal and support documentation also confirms that entity-property-based storage is the main reason automation support is limited today.
Atlassian documentation does describe an Issue property updated automation trigger, but Risk Register support history and internal notes show that entity-property event behaviour is not dependable enough for this use case. In particular, changes made by apps or bulk property updates can fail to raise the event path you would want to automate from. Because of that, ScriptRunner is the safer bridge.
Implementation options
Option | How it works | Best for |
|---|---|---|
Update a Jira custom field | ScriptRunner writes the calculated risk level into a normal custom field on the issue. | Teams that want visible values, JQL, auditability, and simple automation rules. |
Call an automation webhook | ScriptRunner POSTs to a Jira Automation incoming webhook URL with the issue key and risk payload. | Teams that want no extra field and are comfortable debugging webhook-based rules. |
Preferred approach: update a dedicated Jira field
Create a Jira single-select or short text field dedicated to automation, for example Risk Level Trigger. ScriptRunner updates that field whenever the Risk Register assessment changes. Jira Automation then listens for changes to that field and performs the required actions.
Prerequisites
Risk Register for Jira Cloud installed and actively used for assessment.
ScriptRunner for Jira Cloud installed.
A Jira custom field to hold the derived risk level, such as Risk Level Trigger.
Permission to configure ScriptRunner listeners and Jira Automation rules.
At least one sample issue where the Risk Register assessment has already been saved, so you can inspect the live
pbrr-assessmentstructure.
Do not assume the exact JSON paths for your site without checking a real issue first. Risk Register data should be inspected on a sample issue before you finalise the script.
Step 1: Inspect the Risk Register entity property
First confirm the live structure of the assessment payload stored under pbrr-assessment. You are looking for the path that contains the calculated inherent risk level. Depending on the payload version and model, this may include a nested object for the resolved level name.
Typical assessment payloads include paths under inherent, such as:
inherent.impactinherent.probaba derived inherent risk or level object containing the display name
If you are unsure, make a known UI change in Risk Register, then read the property and compare before and after values.
Step 2: Create the target Jira field
Create a custom field that ScriptRunner can update.
If your automation compares labels like Minor, Moderate, or Major, a single select field is usually best.
If your model names may change often, a text field can be simpler.
Recommended field name: Risk Level Trigger.
Use the same option labels as the risk model output so your automation conditions can stay simple.
Step 3: Add the ScriptRunner listener
Configure ScriptRunner to react when the issue is updated, then have the script pull the latest pbrr-assessment property and sync the calculated risk level into the custom field.
The exact event wiring can vary, but the practical pattern is:
Create a listener in ScriptRunner for the relevant issue update event.
Limit it to the relevant project or projects.
Fetch
pbrr-assessmentfor the updated issue.Parse the payload.
Extract the inherent risk level label.
Update the Jira custom field only if the value has changed.
import groovy.json.JsonSlurper
import groovy.json.JsonOutput
def issueKey = issue.key
def propertyKey = 'pbrr-assessment'
// 1. Read the Risk Register entity property
def propResp = get("/rest/api/3/issue/${issueKey}/properties/${propertyKey}")
.header('Accept', 'application/json')
.asString()
if (propResp.status != 200) {
println "pbrr-assessment not found for ${issueKey}"
return
}
def wrapper = new JsonSlurper().parseText(propResp.body) as Map
def payload = (wrapper.value ?: [:]) as Map
// 2. TODO: confirm this JSON path on your site
def newRiskLevel = payload?.inherent?.risk?.name
if (!newRiskLevel) {
println "No inherent risk level found in property for ${issueKey}"
return
}
// 3. Read current field value if needed
def issueResp = get("/rest/api/3/issue/${issueKey}?fields=customfield_12345")
.header('Accept', 'application/json')
.asObject(Map)
def currentValue = issueResp.body?.fields?.customfield_12345
if (currentValue == newRiskLevel || currentValue?.value == newRiskLevel) {
println "Risk Level Trigger already set to ${newRiskLevel} for ${issueKey}"
return
}
// 4. Update the normal Jira field so Automation can trigger
def updateBody = [
fields: [
customfield_12345: [ value: newRiskLevel ]
]
]
def updateResp = put("/rest/api/3/issue/${issueKey}")
.header('Content-Type', 'application/json')
.body(JsonOutput.toJson(updateBody))
.asString()
println "Update response: ${updateResp.status} ${updateResp.body}"
Replace customfield_12345 with the actual custom field ID, and replace payload?.inherent?.risk?.name with the real JSON path from your site.
Step 4: Create the Jira Automation rule
Once ScriptRunner updates the Jira field, standard Jira Automation can take over.
Create a rule with trigger Field value changed.
Select Risk Level Trigger.
Add a condition such as “equals Major” or “equals Minor”.
Add the required actions, such as commenting, sending email, transitioning the issue, or creating follow-up tasks.
Examples of useful automations:
If Risk Level Trigger becomes Major, notify stakeholders.
If it becomes Critical, create a treatment task.
If it drops below a threshold, add a comment noting the reassessment.
Alternative approach: call a Jira Automation webhook
If you do not want an extra custom field, ScriptRunner can call an Automation incoming webhook directly.
Create a Jira Automation rule with the Incoming webhook trigger.
Copy the generated webhook URL.
In ScriptRunner, POST the issue key and risk level to that URL after reading
pbrr-assessment.
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def issueKey = issue.key
def propResp = get("/rest/api/3/issue/${issueKey}/properties/pbrr-assessment").asString()
if (propResp.status != 200) return
def wrapper = new JsonSlurper().parseText(propResp.body) as Map
def payload = (wrapper.value ?: [:]) as Map
def riskLevel = payload?.inherent?.risk?.name
if (!riskLevel) return
def webhookBody = [
issueKey: issueKey,
riskLevel: riskLevel
]
def resp = post("https://automation.atlassian.com/pro/hooks/your-webhook-id")
.header("Content-Type", "application/json")
.body(JsonOutput.toJson(webhookBody))
.asString()
println "${resp.status} ${resp.body}"
Your automation rule can then use {{webhookData.issueKey}} and {{webhookData.riskLevel}}.
Important considerations
Entity property structure matters. Always inspect a live issue to confirm the correct path.
Avoid infinite loops. If ScriptRunner updates an issue field, that field update itself can fire more listeners or rules. Guard against this by exiting when the value has not changed.
UI refresh is separate from persistence. The issue screen may not immediately repaint the derived field after Risk Register saves. Base your logic on saved values, not what the browser currently shows.
Model-specific values may differ. Risk level labels and IDs are defined by the risk model, so do not hard-code assumptions without checking the site configuration.
Some historical notes indicate that not every property update path consistently raises the events you might expect, especially when apps use bulk property updates. Test the listener thoroughly in your own environment.
Testing checklist
- Confirm
pbrr-assessmentexists on a sample issue. - Identify the exact JSON path for the calculated inherent risk level.
- Create the Risk Level Trigger field and add matching option values if using a select list.
- Configure and save the ScriptRunner listener.
- Change the Risk Register toggles on a test issue.
- Verify the target Jira field or webhook payload reflects the new level.
- Verify the Jira Automation rule fires only when expected.
Troubleshooting
Summary
To automate from Risk Register risk level changes in Jira Cloud today, the practical solution is to use ScriptRunner as a bridge. ScriptRunner reads the updated pbrr-assessment entity property and then either updates a standard Jira field or calls a Jira Automation incoming webhook. The field-based approach is usually the simplest and most supportable implementation.