ExposeIncidentOwner
Expose the incident owner into IncidentOwner context key
javascript · Common Scripts
Source
var owner = incidents[0].owner; owner = owner.replace(/\\/g,'\\\\'); var users = executeCommand('getUsers', {}); var ownerJSON = dq(users,'Contents(val.username==="' + owner + '")'); if (ownerJSON) { setContext('IncidentOwner',ownerJSON); return 'Incident owner set in IncidentOwner context key'; } else { return 'Incident has no owner'; }
README
Exposes the incident owner into IncidentOwner context key.
Script Data
| Name | Description |
|---|---|
| Script Type | javascript |
| Tags | Utility |
Inputs
There are no inputs for this script.
Outputs
| Path | Description | Type |
|---|---|---|
| IncidentOwner.name | The full name of the incident owner. | Unknown |
| IncidentOwner.email | The email address of the incident owner. | Unknown |
| IncidentOwner.phone | The phone number of the incident owner. | Unknown |
| IncidentOwner.roles | The roles of the incident owner. | Unknown |