---
title: "Set approver in Jira Service Desk"
canonical: "https://support.appfire.com/space/PSJC/491000318/Set%20approver%20in%20Jira%20Service%20Desk"
format: markdown
---
> Macro (aura-html)


Call this script from a workflow transition action to set the approver based on the value of a custom field.

> ℹ️ Using a SIL alias is the best practice for accessing custom field data. In the script below, the SIL alias is represented by the keyword “fruit”. For more information, go to the [custom fields aliases documentation](https://appfire.atlassian.net/wiki/spaces/PSJC/pages/496206057).

```
if(fruit == "Apple") {
    customfield_10700 = "jmuse";
}
else if(fruit == "Orange") {
    customfield_10700 = "efoulkes";
}
else if(fruit == "Peach") {
    customfield_10700 = "jwang";
}
```