Example scripts
To homepage
Jira

Set the assignee field when the priority is set to High
App in script

ScriptRunner For Jira
by Adaptavist
Compatibility

Jira
Language |
typescript
// Get the field changed on the screen.
const changedField = getChangeField();
// Specify below the AccountId of the user to assign the work item to.
const accountId = "123456-8545622-54522";
if (changedField.getName() === 'Priority') {
const priorityName = changedField.getValue().name.toString();
if (priorityName === "High") {
getFieldById("assignee").setValue(accountId);
} else {
getFieldById("assignee").setValue(null);
}
}Having an issue with this script?
Report it here